lib/active_model/callbacks.rb in activemodel-3.1.12 vs lib/active_model/callbacks.rb in activemodel-3.2.0.rc1

- old
+ new

@@ -57,11 +57,11 @@ # where you can choose if you want all types (before, around or after) or just some. # # define_model_callbacks :initializer, :only => :after # # Note, the <tt>:only => <type></tt> hash will apply to all callbacks defined on - # that method call. To get around this you can call the define_model_callbacks + # that method call. To get around this you can call the define_model_callbacks # method as many times as you need. # # define_model_callbacks :create, :only => :after # define_model_callbacks :update, :only => :before # define_model_callbacks :destroy, :only => :around @@ -91,10 +91,10 @@ :terminator => "result == false", :scope => [:kind, :name], :only => [:before, :around, :after] }.merge(options) - types = Array.wrap(options.delete(:only)) + types = Array.wrap(options.delete(:only)) callbacks.each do |callback| define_callbacks(callback, options) types.each do |type|