Module: JsonApiClient::Associations::BelongsTo::ClassMethods

Defined in:
lib/json_api_client/associations/belongs_to.rb

Instance Method Summary collapse

Instance Method Details

#belongs_to(attr_name, options = {}) ⇒ Object



7
8
9
10
# File 'lib/json_api_client/associations/belongs_to.rb', line 7

def belongs_to(attr_name, options = {})
  # self.associations = self.associations + [HasOne::Association.new(attr_name, self, options)]
  self.associations += [BelongsTo::Association.new(attr_name, self, options)]
end