Module: Bigamy::ActiveRecord::ClassMethods

Defined in:
lib/bigamy.rb

Instance Method Summary collapse

Instance Method Details

#belongs_to_mm(name, options = {}) ⇒ Object



88
89
90
# File 'lib/bigamy.rb', line 88

def belongs_to_mm name, options = {}
  bigamy_associations[name] = ARBelongsTo.new(self, name, options)
end

#divorce_everyoneObject



84
85
86
# File 'lib/bigamy.rb', line 84

def divorce_everyone
  self.bigamy_associations.each {|k,v| v.divorce_everyone }
end

#has_many_mm(name, options = {}) ⇒ Object



96
97
98
# File 'lib/bigamy.rb', line 96

def has_many_mm name, options = {}
  bigamy_associations[name] = ARHasMany.new(self, name, options)
end

#has_one_mm(name, options = {}) ⇒ Object



92
93
94
# File 'lib/bigamy.rb', line 92

def has_one_mm name, options = {}
  bigamy_associations[name] = ARHasOne.new(self, name, options)
end