In order to override the default of 30 that will_paginate enforces I had
to do the following:
def self.list(search, page, numteams)
numteams = 20 if (numteams == nil)
compiled_this_week.paginate :conditions => ['name like ?',
"%#{search}%"], :order => 'rank', :per_page => numteams, :page => page
end
This works..
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---