Module: JSONAPI::Consumer::Associations::BelongsTo::ClassMethods
- Defined in:
- lib/jsonapi/consumer/associations/belongs_to.rb
Instance Method Summary collapse
Instance Method Details
#belongs_to(attr_name, options = {}) ⇒ Object
7 8 9 10 |
# File 'lib/jsonapi/consumer/associations/belongs_to.rb', line 7 def belongs_to(attr_name, = {}) # self.associations = self.associations + [HasOne::Association.new(attr_name, self, options)] self.associations += [BelongsTo::Association.new(attr_name, self, )] end |