Class: DataMapper::Associations::RelationshipChain
- Inherits:
-
Object
- Object
- DataMapper::Associations::RelationshipChain
- Defined in:
- lib/autumn/datamapper_hacks.rb
Overview
:nodoc:
Instance Method Summary collapse
Instance Method Details
#near_relationship ⇒ Object
:nodoc:
177 178 179 |
# File 'lib/autumn/datamapper_hacks.rb', line 177 def near_relationship parent_model.relationships(repository.name)[@near_relationship_name] end |
#remote_relationship ⇒ Object
181 182 183 184 185 |
# File 'lib/autumn/datamapper_hacks.rb', line 181 def remote_relationship return nil unless near_relationship near_relationship.child_model.relationships(repository.name)[@remote_relationship_name] || near_relationship.child_model.relationships(repository.name)[@remote_relationship_name.to_s.singularize.to_sym] end |