From 9b610049bb4f73dbcdc670879683ec2a1a2ab780 Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Sun, 5 Sep 2010 21:20:54 -0300 Subject: Cleanup deprecation warnings in active record MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- activerecord/test/cases/callbacks_test.rb | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'activerecord/test/cases/callbacks_test.rb') diff --git a/activerecord/test/cases/callbacks_test.rb b/activerecord/test/cases/callbacks_test.rb index 8a84f19836..7f4d25790b 100644 --- a/activerecord/test/cases/callbacks_test.rb +++ b/activerecord/test/cases/callbacks_test.rb @@ -16,6 +16,7 @@ class CallbackDeveloper < ActiveRecord::Base define_method(callback_method) do self.history << [callback_method, :method] end + send(callback_method, :"#{callback_method}") end def callback_object(callback_method) @@ -27,15 +28,13 @@ class CallbackDeveloper < ActiveRecord::Base end end - ActiveSupport::Deprecation.silence do - ActiveRecord::Callbacks::CALLBACKS.each do |callback_method| - next if callback_method.to_s =~ /^around_/ - define_callback_method(callback_method) - send(callback_method, callback_string(callback_method)) - send(callback_method, callback_proc(callback_method)) - send(callback_method, callback_object(callback_method)) - send(callback_method) { |model| model.history << [callback_method, :block] } - end + ActiveRecord::Callbacks::CALLBACKS.each do |callback_method| + next if callback_method.to_s =~ /^around_/ + define_callback_method(callback_method) + send(callback_method, callback_string(callback_method)) + send(callback_method, callback_proc(callback_method)) + send(callback_method, callback_object(callback_method)) + send(callback_method) { |model| model.history << [callback_method, :block] } end def history -- cgit v1.2.3