lib/ripple/callbacks.rb in ripple-1.0.0.beta vs lib/ripple/callbacks.rb in ripple-1.0.0.beta2

- old
+ new

@@ -36,39 +36,36 @@ set_callback(:validation, :after, *(args << options), &block) end end # @private - module InstanceMethods - # @private - def really_save(*args, &block) - run_save_callbacks do - super - end + def really_save(*args, &block) + run_save_callbacks do + super end - - def run_save_callbacks - state = new? ? :create : :update - run_callbacks(:save) do - run_callbacks(state) do - yield - end + end + + def run_save_callbacks + state = new? ? :create : :update + run_callbacks(:save) do + run_callbacks(state) do + yield end end - - # @private - def destroy(*args, &block) - run_callbacks(:destroy) do - super - end + end + + # @private + def destroy!(*args, &block) + run_callbacks(:destroy) do + super end - - # @private - def valid?(*args, &block) - @_on_validate = new? ? :create : :update - run_callbacks(:validation) do - super - end + end + + # @private + def valid?(*args, &block) + @_on_validate = new? ? :create : :update + run_callbacks(:validation) do + super end end end end