Class: ObjectJSONMapper::Associations::HasMany
- Inherits:
-
Association
- Object
- Association
- ObjectJSONMapper::Associations::HasMany
- Defined in:
- lib/object_json_mapper/associations/has_many.rb
Instance Attribute Summary
Attributes inherited from Association
Instance Method Summary collapse
Methods inherited from Association
#endpoint, #initialize, #klass
Constructor Details
This class inherits a constructor from ObjectJSONMapper::Associations::Association
Instance Method Details
#call(object) ⇒ ObjectJSONMapper::Relation
6 7 8 9 10 |
# File 'lib/object_json_mapper/associations/has_many.rb', line 6 def call(object) klass.where.tap do |relation| relation.path = object.client[endpoint].url end end |