Module: Videojuicer::Resource::Inferrable::InstanceMethods
- Defined in:
- lib/videojuicer/resource/inferrable.rb
Instance Method Summary collapse
-
#resource_path(action = nil, route_options = {}) ⇒ Object
Returns the appropriate resource path for this object.
Instance Method Details
#resource_path(action = nil, route_options = {}) ⇒ Object
Returns the appropriate resource path for this object. If the object is a new record, then the root object type path will be given. If the object is not new (has an ID) then the specific ID will be used.
40 41 42 43 44 |
# File 'lib/videojuicer/resource/inferrable.rb', line 40 def resource_path(action=nil, ={}) = {:id=>id}.merge() unless new_record? r = self.class.resource_route(action, ) self.class.compile_route(r, attributes) end |