Sha256: 9c8f1053724372fd45738799f2bc376e010ab4475d9a957babcffc36c1d70e07
Contents?: true
Size: 470 Bytes
Versions: 31
Compression:
Stored size: 470 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 def parse(param) [param].flatten.map{|data| association_class.new(data) } end end end end end
Version data entries
31 entries across 31 versions & 1 rubygems