Module: Heritage::ActiveRecord::ActsAsHeir::InstanceMethods

Defined in:
lib/heritage/active_record/acts_as_heir.rb

Instance Method Summary collapse

Instance Method Details

#predecessor_with_build(attributes = {}) ⇒ Object



61
62
63
# File 'lib/heritage/active_record/acts_as_heir.rb', line 61

def predecessor_with_build(attributes = {})
  predecessor_without_build || build_predecessor(attributes)
end

#touch_predecessorObject



65
66
67
68
69
# File 'lib/heritage/active_record/acts_as_heir.rb', line 65

def touch_predecessor
  if self.changed?
    predecessor.touch
  end
end