Module: FrederickAPI::V2::Helpers::HasMany::ClassMethods

Defined in:
lib/frederick_api/v2/helpers/has_many.rb

Overview

Class methods added to resource

Instance Method Summary collapse

Instance Method Details

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



13
14
15
# File 'lib/frederick_api/v2/helpers/has_many.rb', line 13

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