Method: ActiveResource::Singleton::ClassMethods#find
- Defined in:
- lib/active_resource/singleton.rb
#find(options = {}) ⇒ Object
Core method for finding singleton resources.
Arguments
Takes a single argument of options
Options
-
:params- Sets the query and prefix (nested URL) parameters.
Examples
Weather.find
# => GET /weather.json
Weather.find(:params => {:degrees => 'fahrenheit'})
# => GET /weather.json?degrees=fahrenheit
Failure or missing data
A failure to find the requested object raises a ResourceNotFound
exception.
Inventory.find
# => raises ResourceNotFound
63 64 65 |
# File 'lib/active_resource/singleton.rb', line 63 def find(={}) find_singleton() end |