Module: JSONAPI::Consumer::Associations::HasMany::ClassMethods

Defined in:
lib/jsonapi/consumer/associations/has_many.rb

Instance Method Summary collapse

Instance Method Details

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



7
8
9
# File 'lib/jsonapi/consumer/associations/has_many.rb', line 7

def has_many(attr_name, options = {})
  self.associations = self.associations + [HasMany::Association.new(attr_name, self, options)]
end