aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/deprecation.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-08-08 07:03:44 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-08-08 07:03:44 +0000
commit2ce49e7dd56515491238ccb7961987ea82055105 (patch)
tree0a6a1ed7bd4bdd95fe531a9c0a775476982c067b /activesupport/lib/active_support/deprecation.rb
parent0a44c858660600960a2f7be75ce53e9a7841ae76 (diff)
downloadrails-2ce49e7dd56515491238ccb7961987ea82055105.tar.gz
rails-2ce49e7dd56515491238ccb7961987ea82055105.tar.bz2
rails-2ce49e7dd56515491238ccb7961987ea82055105.zip
separate warn method for easier localization override
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4720 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/active_support/deprecation.rb')
-rw-r--r--activesupport/lib/active_support/deprecation.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/deprecation.rb b/activesupport/lib/active_support/deprecation.rb
index f81a2a02e5..5aff753616 100644
--- a/activesupport/lib/active_support/deprecation.rb
+++ b/activesupport/lib/active_support/deprecation.rb
@@ -81,8 +81,12 @@ module ActiveSupport
end
private
+ def warn(callstack, called, args)
+ ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", callstack)
+ end
+
def method_missing(called, *args, &block)
- ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", caller)
+ warn caller, called, args
@instance.__send__(@method).__send__(called, *args, &block)
end
end