mirror of
https://github.com/github/rails.git
synced 2026-01-30 00:38:00 -05:00
separate warn method for easier localization override
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4720 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user