Module: Highrise::Searchable::ClassMethods
- Defined in:
- lib/highrise/searchable.rb
Instance Method Summary collapse
-
#search(options = {}) ⇒ Object
List By Search Criteria Ex: Highrise::Person.search(:email => “[email protected]”, :country => “CA”) Available criteria are: city, state, country, zip, phone, email.
Instance Method Details
#search(options = {}) ⇒ Object
List By Search Criteria Ex: Highrise::Person.search(:email => “[email protected]”, :country => “CA”) Available criteria are: city, state, country, zip, phone, email
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/highrise/searchable.rb', line 11 def search( = {}) raise ArgumentError, "cannot convert #{}:#{.class} to hash" if .kind_of?(String) # This might have to be changed in the future if other non-pagable resources become searchable [:kind] ||= collection_name = {:from => "/parties/search.xml", :params => } if respond_to?(:find_all_across_pages) find_all_across_pages() else find(:all, ) end end |