Method: Her::Model::Paths::ClassMethods#resource_path
- Defined in:
- lib/her/model/paths.rb
#resource_path(path = nil) ⇒ Object
Defines a custom resource path for the resource
Note that, if used in combination with resource_path, you may specify either the real primary key or the string ‘:id’. For example:
80 81 82 83 84 85 86 |
# File 'lib/her/model/paths.rb', line 80 def resource_path(path = nil) if path.nil? @_her_resource_path ||= "#{root_element.to_s.pluralize}/:id" else @_her_resource_path = path end end |