Class: Yogo::Collection::Relationship::ManyToOne
- Inherits:
-
Yogo::Collection::Relationship
- Object
- Property
- Yogo::Collection::Relationship
- Yogo::Collection::Relationship::ManyToOne
- Defined in:
- lib/yogo/collection/property.rb
Constant Summary
Constants inherited from Property
Instance Method Summary collapse
Methods inherited from Yogo::Collection::Relationship
#as_json, #check_target, #target_model
Methods inherited from Property
#as_json, #field_name, #to_s, #update_attributes
Instance Method Details
#add_to_model(model) ⇒ Object
119 120 121 122 |
# File 'lib/yogo/collection/property.rb', line 119 def add_to_model(model) check_target model.send(model_method, ActiveSupport::Inflector.underscore(self.target).intern, .merge(self.)) end |
#model_method ⇒ Object
115 116 117 |
# File 'lib/yogo/collection/property.rb', line 115 def model_method :belongs_to end |