aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel
diff options
context:
space:
mode:
authorAlexey Gaziev <alex.gaziev@gmail.com>2012-10-30 10:23:41 +0800
committerAlexey Gaziev <alex.gaziev@gmail.com>2012-10-30 10:23:41 +0800
commitb955939d55b71905fa3e5036149ee4c84943c599 (patch)
treefaceebca94859de69e12f4d7b48e9958b1631575 /activemodel
parent4e23c0ef341c2cba6a4b21022d4ffbabdaa6e3da (diff)
downloadrails-b955939d55b71905fa3e5036149ee4c84943c599.tar.gz
rails-b955939d55b71905fa3e5036149ee4c84943c599.tar.bz2
rails-b955939d55b71905fa3e5036149ee4c84943c599.zip
Make caller attribute in deprecation methods optional
Diffstat (limited to 'activemodel')
-rw-r--r--activemodel/lib/active_model/attribute_methods.rb2
-rw-r--r--activemodel/lib/active_model/observing.rb2
2 files changed, 2 insertions, 2 deletions
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
# <tt>count_observers</tt> 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