lib/ohm/callbacks.rb in ohm-contrib-1.2 vs lib/ohm/callbacks.rb in ohm-contrib-2.0.0.alpha2
- old
+ new
@@ -20,10 +20,10 @@
# def after_save
# # do something with the ids
# end
# end
module Callbacks
- def save!
+ def save
is_new = new?
before_create if is_new
before_update if not is_new
before_save