Sha256: 6e47dfc27e1c713b333b03408e9bf61630a3a4438bbc2bbbfb08dc1758a0d330
Contents?: true
Size: 525 Bytes
Versions: 13
Compression:
Stored size: 525 Bytes
Contents
require "spira/association_reflection" module Spira module Reflections # Returns a hash containing all AssociationReflection objects for the current class # Example: # # Invoice.reflections # Account.reflections # def reflections read_inheritable_attribute(:reflections) || write_inheritable_attribute(:reflections, {}) end def reflect_on_association(association) reflections[association].is_a?(AssociationReflection) ? reflections[association] : nil end end end
Version data entries
13 entries across 13 versions & 1 rubygems