You are here: Browse Railsplugins Searchable
Adds simple search singleton method to class.
class Person < ActiveRecord::Base
searchable_for :name
end
Person.search("David")
class Person < ActiveRecord::Base
searchable_for :first_name, :last_name, :suffix => true
searchable_for :first_name, :last_name, :suffix => :name
end
Person.search_by_first_name_and_last_name("David")
Person.search_by_name("David")
Copyright© 2007 Joshua Peek, released under the MIT license
Homepage: http://projects.wh.joshpeek.com/browser/plugins/searchable