Module: Bigamy::ActiveRecord::ClassMethods
- Defined in:
- lib/bigamy.rb
Instance Method Summary collapse
- #belongs_to_mm(name, options = {}) ⇒ Object
- #divorce_everyone ⇒ Object
- #has_many_mm(name, options = {}) ⇒ Object
- #has_one_mm(name, options = {}) ⇒ Object
Instance Method Details
#belongs_to_mm(name, options = {}) ⇒ Object
88 89 90 |
# File 'lib/bigamy.rb', line 88 def belongs_to_mm name, = {} bigamy_associations[name] = ARBelongsTo.new(self, name, ) end |
#divorce_everyone ⇒ Object
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, = {} bigamy_associations[name] = ARHasMany.new(self, name, ) end |
#has_one_mm(name, options = {}) ⇒ Object
92 93 94 |
# File 'lib/bigamy.rb', line 92 def has_one_mm name, = {} bigamy_associations[name] = ARHasOne.new(self, name, ) end |