Sha256: 447e5e86c1dc2c012b0b8e463ecdb950a7ca874c8496d2eff066f9c25b0b696b
Contents?: true
Size: 330 Bytes
Versions: 1
Compression:
Stored size: 330 Bytes
Contents
class Memento::Action::Destroy < Memento::Action::Base def fetch record.attributes_for_memento end def undo @state.rebuild_object do |object| begin object.save! rescue object.id = nil object.save! end @state.update_attribute(:record, object) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
yolk-memento-0.2.0 | lib/memento/action/destroy.rb |