Module: Cti::ActiveRecord::ActsAsHeir::InstanceMethods
- Defined in:
- lib/cti/active_record/acts_as_heir.rb
Instance Method Summary collapse
- #heritage ⇒ Object
- #lineage ⇒ Object
- #predecessor_with_build(attributes = {}) ⇒ Object
- #touch_predecessor ⇒ Object
Instance Method Details
#heritage ⇒ Object
86 87 88 |
# File 'lib/cti/active_record/acts_as_heir.rb', line 86 def heritage predecessor end |
#lineage ⇒ Object
90 91 92 |
# File 'lib/cti/active_record/acts_as_heir.rb', line 90 def lineage self end |
#predecessor_with_build(attributes = {}) ⇒ Object
94 95 96 |
# File 'lib/cti/active_record/acts_as_heir.rb', line 94 def predecessor_with_build(attributes = {}) predecessor_without_build || build_predecessor(attributes) end |
#touch_predecessor ⇒ Object
98 99 100 101 102 |
# File 'lib/cti/active_record/acts_as_heir.rb', line 98 def touch_predecessor if self.changed? predecessor.touch end end |