Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4720

Show
Ignore:
Timestamp:
08/08/06 07:03:44 (2 years ago)
Author:
bitsweat
Message:

separate warn method for easier localization override

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/activesupport/lib/active_support/deprecation.rb

    r4719 r4720  
    8282 
    8383      private 
     84        def warn(callstack, called, args) 
     85          ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", callstack) 
     86        end 
     87 
    8488        def method_missing(called, *args, &block) 
    85           ActiveSupport::Deprecation.warn("#{@var} is deprecated! Call #{@method}.#{called} instead of #{@var}.#{called}. Args: #{args.inspect}", caller) 
     89          warn caller, called, args 
    8690          @instance.__send__(@method).__send__(called, *args, &block) 
    8791        end