module Gearhead::Extensions::Associations
Public Class Methods
included(klass)
click to toggle source
# File lib/gearhead/extensions/associations.rb, line 4 def self.included(klass) klass.define_gear_setting :associations, { belongs_to: [], has_many: [], has_one: [] } end
Public Instance Methods
belongs_to(klass)
click to toggle source
# File lib/gearhead/extensions/associations.rb, line 8 def belongs_to(klass) @_gear_associations[:belongs_to] << klass end