search for: find_by_something_and_bar

Displaying 1 result from an estimated 1 matches for "find_by_something_and_bar".

2005 Dec 19
6
custom find methods and pagination
...ode is less cluttered, plus the DRY factor. example: class Foo < ActiveRecord::Base def find_by_something(something) find :all, :joins => ..., :conditions => ... end def find_by_something_else(something_else) find :all, :joins => ..., :conditions => ... end def find_by_something_and_bar(something, bar) find :all, :joins => ..., :conditions => ... end now my question: is there a way to do Foo.find_by_something(something) in a paginator? would I have to modify all my methods to accept a limit and offset parameter? thanks ______________________________________________...