Sha256: 7c7171ff7dccf95148e6909055f478d12c2db73753b15048ef65433db30d742d
Contents?: true
Size: 423 Bytes
Versions: 15
Compression:
Stored size: 423 Bytes
Contents
module JsonApiClient module Associations module HasOne extend ActiveSupport::Concern module ClassMethods def has_one(attr_name, options = {}) self.associations += [HasOne::Association.new(attr_name, self, options)] end end class Association < BaseAssociation def from_result_set(result_set) result_set.first end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems