Class: Orientea::ChangingCommand
- Defined in:
- lib/orientea/changing_command.rb
Instance Attribute Summary
Attributes inherited from Command
Class Method Summary collapse
Methods inherited from Command
Class Method Details
.build(record) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/orientea/changing_command.rb', line 5 def self.build(record) command = self.new command.data = Hash.new command.data['cls_str'] = record.class.to_s command.data['cls_id'] = record.id command.data['changes'] = record.changes.to_json command.save! command end |