aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2008-08-28 10:37:46 -0500
committerJoshua Peek <josh@joshpeek.com>2008-08-28 10:37:46 -0500
commitacbf2b74aa3001fb6064bba96cd0033495774357 (patch)
tree54bd7e783a063ddf359721eefd2a5566d12a9a0f /activesupport/lib
parent8b6870cfae8d50a2ffd4f024d33d51aadaa6a6f7 (diff)
downloadrails-acbf2b74aa3001fb6064bba96cd0033495774357.tar.gz
rails-acbf2b74aa3001fb6064bba96cd0033495774357.tar.bz2
rails-acbf2b74aa3001fb6064bba96cd0033495774357.zip
Deprecated implicit local assignments when rendering partials
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/deprecation.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index 01eb5df593..e543163bd5 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -162,6 +162,22 @@ module ActiveSupport
end
end
+ class DeprecatedObjectProxy < DeprecationProxy
+ def initialize(object, message)
+ @object = object
+ @message = message
+ end
+
+ private
+ def target
+ @object
+ end
+
+ def warn(callstack, called, args)
+ ActiveSupport::Deprecation.warn(@message, callstack)
+ end
+ end
+
# Stand-in for <tt>@request</tt>, <tt>@attributes</tt>, <tt>@params</tt>, etc.
# which emits deprecation warnings on any method call (except +inspect+).
class DeprecatedInstanceVariableProxy < DeprecationProxy #:nodoc: