Module: ActsAsEdition::InstanceMethods
- Defined in:
- lib/acts_as_edition.rb
Instance Method Summary collapse
Instance Method Details
#clone_edition! ⇒ Object
28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/acts_as_edition.rb', line 28 def clone_edition! self.class.transaction do self.send("#{self.pre_hook}") if self.pre_hook cloned = self.dup cloned.send("#{self.after_clone}") if self.after_clone cloned.ancestor = self cloned.save! self.reload clone_edition_chain clone_resource_chain self.send("#{self.post_hook}") if self.post_hook cloned.save! cloned.reload end if aae_conditions_met end |