Sha256: 36ed99c266c5c43cb0c79ba818f755c2011ff0441cc3094ab5f6ea9a95eaacb7

Contents?: true

Size: 366 Bytes

Versions: 15

Compression:

Stored size: 366 Bytes

Contents

module JsonApiClient
  module Associations
    module HasMany
      extend ActiveSupport::Concern

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

      class Association < BaseAssociation
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
json_api_client-1.6.1 lib/json_api_client/associations/has_many.rb
json_api_client-1.6.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.5.3 lib/json_api_client/associations/has_many.rb
json_api_client-1.5.2 lib/json_api_client/associations/has_many.rb
json_api_client-1.5.1 lib/json_api_client/associations/has_many.rb
json_api_client-1.5.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.4.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.3.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.2.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.1.1 lib/json_api_client/associations/has_many.rb
json_api_client-1.1.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.0.2 lib/json_api_client/associations/has_many.rb
json_api_client-1.0.1 lib/json_api_client/associations/has_many.rb
json_api_client-1.0.0 lib/json_api_client/associations/has_many.rb
json_api_client-1.0.0.beta7 lib/json_api_client/associations/has_many.rb