instance method
interpolate_with_deprecated_syntax
Ruby on Rails 2.2.3
Since v2.2.3 Last seen in v2.2.3Signature
interpolate_with_deprecated_syntax(locale, string, values = {})
No documentation comment.
Parameters
-
localereq -
stringreq -
valuesopt = {}
Source
# File activerecord/lib/active_record/i18n_interpolation_deprecation.rb, line 12
def interpolate_with_deprecated_syntax(locale, string, values = {})
return string unless string.is_a?(String)
string = string.gsub(/%d|%s/) do |s|
instead = DEPRECATED_INTERPOLATORS[s]
ActiveSupport::Deprecation.warn "using #{s} in messages is deprecated; use #{instead} instead."
instead
end
interpolate_without_deprecated_syntax(locale, string, values)
end
Defined in activerecord/lib/active_record/i18n_interpolation_deprecation.rb line 12
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in I18n::Backend::Simple