aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/attribute_methods/serialization.rb
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-10-29 08:42:16 -0700
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-10-29 08:42:16 -0700
commitd1c95d912ec39e7e374aee605a1d6fb11f8521d7 (patch)
tree9ec15855e1cab91c346d5a09e6adb593c7585608 /activerecord/lib/active_record/attribute_methods/serialization.rb
parent72e6fb005fbdd211883282fc761d3ded23ef7fbb (diff)
parent0b7067d8497c4d832b32233888ce973ab4357e5d (diff)
downloadrails-d1c95d912ec39e7e374aee605a1d6fb11f8521d7.tar.gz
rails-d1c95d912ec39e7e374aee605a1d6fb11f8521d7.tar.bz2
rails-d1c95d912ec39e7e374aee605a1d6fb11f8521d7.zip
Merge pull request #8063 from nikitug/deprecation_caller_context
Provide a call stack for deprecation warnings where needed.
Diffstat (limited to 'activerecord/lib/active_record/attribute_methods/serialization.rb')
-rw-r--r--activerecord/lib/active_record/attribute_methods/serialization.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/attribute_methods/serialization.rb b/activerecord/lib/active_record/attribute_methods/serialization.rb
index 9994a81ede..d8fe4afd54 100644
--- a/activerecord/lib/active_record/attribute_methods/serialization.rb
+++ b/activerecord/lib/active_record/attribute_methods/serialization.rb
@@ -45,7 +45,8 @@ module ActiveRecord
end
def serialized_attributes
- ActiveSupport::Deprecation.warn("Instance level serialized_attributes method is deprecated, please use class level method.")
+ message = "Instance level serialized_attributes method is deprecated, please use class level method."
+ ActiveSupport::Deprecation.warn(message, caller)
defined?(@serialized_attributes) ? @serialized_attributes : self.class.serialized_attributes
end