lib/kentouzu/has_drafts.rb in kentouzu-0.0.3 vs lib/kentouzu/has_drafts.rb in kentouzu-0.0.4

- old
+ new

@@ -63,10 +63,10 @@ base.send :define_method, :save do if switched_on? && save_draft? puts "calling new save" - draft = Draft.new(:item_type => self.class.to_s, :item_id => self.id, :event => self.persisted? ? "update" : "create", :source_type => Kentouzu.source.present? ? Kentouzu.source.class.to_s : nil, :source_id => Kentouzu.source.present? ? Kentouzu.source.id : nil, :object => self.to_yaml) + draft = Draft.new(:item_type => self.class.base_class.to_s, :item_id => self.id, :event => self.persisted? ? "update" : "create", :source_type => Kentouzu.source.present? ? Kentouzu.source.class.to_s : nil, :source_id => Kentouzu.source.present? ? Kentouzu.source.id : nil, :object => self.to_yaml) draft.save else puts "calling default save"