Displaying 1 result from an estimated 1 matches for "find_by_something_else".
2005 Dec 19
6
custom find methods and pagination
...methods in my models i use to find based on certain
criteria...i''ve done this so the controller code 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 a...