Module: Her::Model::Paths

Extended by:
ActiveSupport::Concern
Included in:
Her::Model
Defined in:
lib/her/model/paths.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#request_pathObject

Return a path based on the collection path and a resource data

Examples:

class User
  include Her::Model
  collection_path "/utilisateurs"
end

User.find(1) # Fetched via GET /utilisateurs/1


14
15
16
# File 'lib/her/model/paths.rb', line 14

def request_path
  self.class.build_request_path(@data.dup)
end