Class: Enki::DeletePageUndo
- Defined in:
- app/models/enki/delete_page_undo.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.create_undo(page) ⇒ Object
27 28 29 |
# File 'app/models/enki/delete_page_undo.rb', line 27 def create_undo(page) DeletePageUndo.create!(:data => page.attributes.to_yaml) end |
Instance Method Details
#complete_description ⇒ Object
22 23 24 |
# File 'app/models/enki/delete_page_undo.rb', line 22 def complete_description "Recreated page '#{loaded_data['title']}'" end |
#description ⇒ Object
18 19 20 |
# File 'app/models/enki/delete_page_undo.rb', line 18 def description "Deleted page '#{loaded_data['title']}'" end |
#loaded_data ⇒ Object
14 15 16 |
# File 'app/models/enki/delete_page_undo.rb', line 14 def loaded_data @loaded_data ||= YAML.load(data) end |