Displaying 1 result from an estimated 1 matches for "animalcontroller".
Did you mean:
animalscontroller
2006 Apr 22
4
Slice and dice plugin
...ion_more_than => 1_000_000}
Animals.with_scope :find => {:conditions => {:name_contains => ''Tiger''}} do
Animals.find :all
end
Finally, here''s an simple way to use this plugin to add lots of data
slicing and dicing to any list actions you might have:
class AnimalController < ActiveController
def list
animal_conditions = params.dup.reject! {|k, v| [:action, :control
ler].include? k}
@animals = Animal.find :all, :conditions => animal_conditions
end
end
This allows urls such as
/animal/list?name_starts_with=T&population_less_than=1000
Please take...