Class: Ocelot::Rules::DefaultRule

Inherits:
Rule
  • Object
show all
Defined in:
lib/ocelot/rules.rb

Direct Known Subclasses

ScriptRule

Instance Method Summary collapse

Methods inherited from Rule

#relationships, #save_to_db, #use_source_db!, #use_target_db!

Methods inherited from Base

#connection, #in?, #logger, #obj_to_s, #remove_callbacks, #safely

Instance Method Details

#save(obj, *extra) ⇒ Object



47
48
49
50
51
52
53
54
# File 'lib/ocelot/rules.rb', line 47

def save(obj, *extra)
  id = obj.id
  obj = obj.clone 
  obj.id = id
  remove_callbacks(obj)
  save_to_db(obj)
  Rules::INSPECT_DEEP
end