Class: Memento::Action::Create
- Defined in:
- lib/memento/action/create.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#fetch?, inherited, #initialize, #record, #record_data
Constructor Details
This class inherits a constructor from Memento::Action::Base
Instance Method Details
#fetch ⇒ Object
4 |
# File 'lib/memento/action/create.rb', line 4 def fetch;end |
#undo ⇒ Object
6 7 8 9 10 11 12 13 14 |
# File 'lib/memento/action/create.rb', line 6 def undo if record.nil? build_fake_object elsif record_was_changed? was_changed else destroy_record end end |