Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Activity (RSS)

Wednesday, September 26 2007
116 :page => :last was updated
  • Mislav
    • State changed from open to invalid
    by Mislav at 1:57 PM

    Hi Eugene,

    I don't like adding another option, it gets too cluttered. What I do is this:

    User.paginate :page => params[:page], :order => 'updated_at DESC'
    

    ...

119 helper issue when request.method != :get was updated
  • Matt Aimonetti (mattetti)
    Matt Aimonetti (mattetti) commented at 1:57 PM

    I have some update and delete action called remotely which re render a div including some photos and the pagination helper.

    The pagination helper is included ...

  • Mislav
    • State changed from new to open
    by Mislav at 1:38 PM

    Not so simple. The helper must merge GET or POST params because the page being rendered might be a search initiated by GET or POST and I have to preserve param...

  • Matt Aimonetti (mattetti)
    Matt Aimonetti (mattetti) commented at 1:36 PM

    here is an example how what I meant earlier.

  • Matt Aimonetti (mattetti)
    Matt Aimonetti (mattetti) commented at 1:18 PM

    on suggestion to fix this problem is to add a new pagination option: pagination_action or default_action.

    in the page_link_or_span method we can easily check ...

  • Matt Aimonetti (mattetti)
    Matt Aimonetti (mattetti) created the ticket at 1:10 PM

    So here is my problem, I'm using will_paginate to paginate a list a pictures. The pagination helper is located at the bottom of the panel with all my pictures....

118 Getting an error with foreign_key on edge was updated
  • Mislav
    • State changed from new to invalid
    by Mislav at 1:49 PM
  • scott (at scottwalter)
    scott (at scottwalter) commented at 11:28 AM

    Please close this ticket as soon as possible to prevent my incompetence from spreading :) Oops I had another plugin installed (foreign_key_migration) which wa...

  • scott (at scottwalter)
    scott (at scottwalter) created the ticket at 11:18 AM

    When attempting to do this:

    foreign_key :group
    

    I get the following error:

    undefined method `include?' for :group:Symbol
    

    I am running on Rails Edge btw.

Tuesday, September 25 2007
117 Illegal MySQL in #to_sql and #to_hash was updated
  • Allan Cochrane
    Allan Cochrane created the ticket at 10:15 AM

    in script/console I run

    >> SimulationColumn.select{'name' == "comfy"}.to_sql

    => "SELECT * FROM simcols WHERE 'name' = 'comfy'"

    (This is a legacy database, t...

116 :page => :last was updated
  • Chris Wanstrath
    • Assigned user changed from Chris Wanstrath to Mislav
    • State changed from new to open
    by Chris Wanstrath at 12:22 AM
  • Eugene Pimenov
    • Title changed from [PATCH] :page => :last to :page => :last
    by Eugene Pimenov at 12:11 AM
  • Eugene Pimenov
    Eugene Pimenov created the ticket at 12:09 AM

    Mode.paginate :page => (params[:page] || :last), :default_page => :last

    show's last page by default :)

    Useful for me :)

Monday, September 24 2007
[AutoMigrations] simple change_column... was committed by Chris Wanstrath at 11:10 PM
Sunday, September 23 2007
115 Support migration-based automatic versioning was updated
  • Danny Burkes
    Danny Burkes created the ticket at 7:14 PM

    If options[:version] = (some sentinel symbol), set options[:version] to the current migration version.

114 Large page count when paginating an association along with deep conditions was updated
Saturday, September 22 2007
[AutoMigrations] tell them about the ... was committed by Chris Wanstrath at 2:03 PM
[AutoMigrations] Include all column o... was committed by Chris Wanstrath at 1:57 PM
[AutoMigrations] simple schema_to_mig... was committed by Chris Wanstrath at 1:30 PM
Friday, September 21 2007
114 Large page count when paginating an association along with deep conditions was updated
  • Mina Naguib
    Mina Naguib commented at 6:59 PM

    That was precisely it. Freezing 1-2-stable fixed the problem.

    Thank you for a wonderful plugin. I apologize for opening the ticket.

  • Chris Wanstrath
    • State changed from new to open
    by Chris Wanstrath at 5:38 PM

    Thanks, that would be awesome.

  • Mina Naguib
    Mina Naguib commented at 5:00 PM

    After a bit of research, I believe that this is already handled by test "test_paginate_associations_with_include" which recommends upgrading to rais > 1.2.3 to...

  • Mina Naguib
    Mina Naguib created the ticket at 2:19 PM

    Example:

    @author.articles.paginate(:all, :include => :comments, :conditions => "comments.approved = true", :page => params[:page])
    

    Will issue an errant "cou...

105 add scoped finders was updated
  • Grant Rodgers
    Grant Rodgers commented at 12:06 PM

    Yep, that occurred to me. Certainly a matter of taste which you prefer.

    I think it might be a bit better encapsulated as a special method, and maybe faster s...

  • Chris Wanstrath
    Chris Wanstrath commented at 12:00 PM

    Maybe this is worth posting about.

  • Chris Wanstrath
    Chris Wanstrath commented at 11:59 AM

    You can do this already, y'know:

    class Company
      def self.high_rated
        query_context.select { |c| c.rating > 3 }
      end
    end
    
    >> Company.high_rated.to_s...
Thursday, September 20 2007
105 add scoped finders was updated
  • Grant Rodgers
    Grant Rodgers commented at 6:47 PM

    Not sure how add-ons are packaged, unfortunately - let me know if there's something else to be done.

  • Grant Rodgers
    Grant Rodgers commented at 6:46 PM

    works like this:

    class User < ActiveRecord::Base
      scoped_context :admins do |context|
        context.select { |u| u.type == 'Admin' }
      end
    end
    
    User.admi...
  • Grant Rodgers
    Grant Rodgers commented at 6:40 PM

    went ahead and wrote this. Rather small amount of code.

Tuesday, September 18 2007
113 empty? on associations was updated
  • Chris Wanstrath
    Chris Wanstrath created the ticket at 12:41 PM

    Nicolas wants:

    class Provider < AR
     has_many :orders
    end
    
    class Order < AR
     belongs_to :provider
    end
    
    Provider.select { |p| p.name =~ 'A%' && p.orders...
Monday, September 17 2007
[AutoMigrations] remove edge requirem... was committed by Chris Wanstrath at 7:37 PM
cache_fu: match instance get_cache be... was committed by Chris Wanstrath at 5:58 PM
cache_fu: handle non-array includes ... was committed by Chris Wanstrath at 5:45 PM
110 [PATCH] Handle include without array brackets was updated
cache_fu: add in scoped keys for inst... was committed by Chris Wanstrath at 5:45 PM
[AutoMigrations] add index support h... was committed by Chris Wanstrath at 11:35 AM
Make create_table output a little nic... was committed by Chris Wanstrath at 7:57 AM
Sunday, September 16 2007
Migrate automatically http://plugins... was committed by Chris Wanstrath at 10:54 PM
111 Task Body Missing was updated
107 Option to Omit Page Numbers was updated
  • Chris Wanstrath
    • Assigned user changed from Chris Wanstrath to Mislav
    • State changed from new to open
    by Chris Wanstrath at 12:36 PM
105 add scoped finders was updated
  • Chris Wanstrath
    • State changed from new to invalid
    by Chris Wanstrath at 12:36 PM

    The plan is for Ambition to only support the Ruby Enumerable API. You're welcome to write an add-on which supports this, though.

104 Super-abstraction feature request was updated
  • Chris Wanstrath
    • State changed from new to resolved
    by Chris Wanstrath at 12:34 PM

    This is in the works, yes.

103 svn checkout fails was updated
  • Garry Dolley
    Garry Dolley commented at 4:07 AM

    Thank you for moving Ambition to a version control system that has intelligence and aids in development, instead of being simply a patch database. I've been u...

Friday, September 14 2007
cache_fu: :withs for instance #caches... was committed by Chris Wanstrath at 11:13 AM
111 Task Body Missing was updated
Wednesday, September 12 2007
110 [PATCH] Handle include without array brackets was updated
  • PJ Hyett
    PJ Hyett commented at 11:31 AM

    set_cache_with_associations doesn't work with this syntax either, patch updated.

  • PJ Hyett
    PJ Hyett created the ticket at 11:23 AM

    expire_cache_with_associations breaks if your call looks like:

    acts_as_cached :include => :slug
    
Monday, September 10 2007
cache_fu: dont need #delete after all... was committed by Chris Wanstrath at 6:03 PM
cache_fu: okay to use CACHE directly ... was committed by Chris Wanstrath at 5:30 PM
cache_fu: more action/fragment cachin... was committed by Chris Wanstrath at 3:15 PM