From b955939d55b71905fa3e5036149ee4c84943c599 Mon Sep 17 00:00:00 2001 From: Alexey Gaziev Date: Tue, 30 Oct 2012 10:23:41 +0800 Subject: Make caller attribute in deprecation methods optional --- activemodel/lib/active_model/attribute_methods.rb | 2 +- activemodel/lib/active_model/observing.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model/attribute_methods.rb b/activemodel/lib/active_model/attribute_methods.rb index 0f5c7f13a8..86eaad830e 100644 --- a/activemodel/lib/active_model/attribute_methods.rb +++ b/activemodel/lib/active_model/attribute_methods.rb @@ -387,7 +387,7 @@ module ActiveModel "necessary. If the un-prefixed/suffixed version of the method has not been " \ "defined when `define_attribute_methods` is called, it will be defined " \ "automatically." - ActiveSupport::Deprecation.warn(message, caller) + ActiveSupport::Deprecation.warn message end @prefix, @suffix = options.fetch(:prefix, ''), options.fetch(:suffix, '') diff --git a/activemodel/lib/active_model/observing.rb b/activemodel/lib/active_model/observing.rb index 277bf30b6a..5f1c99ce62 100644 --- a/activemodel/lib/active_model/observing.rb +++ b/activemodel/lib/active_model/observing.rb @@ -172,7 +172,7 @@ module ActiveModel # count_observers is deprecated. Use #observers_count. def count_observers msg = "count_observers is deprecated in favor of observers_count" - ActiveSupport::Deprecation.warn(msg, caller) + ActiveSupport::Deprecation.warn msg observers_count end -- cgit v1.2.3