instance method
scope_key_by_partial
Ruby on Rails 3.0.20
Since v3.0.20 PrivateSignature
scope_key_by_partial(key)
No documentation comment.
Parameters
-
keyreq
Source
# File actionpack/lib/action_view/helpers/translation_helper.rb, line 71
def scope_key_by_partial(key)
if key.to_s.first == "."
if @_virtual_path
@_virtual_path.gsub(%r{/_?}, ".") + key.to_s
else
raise "Cannot use t(#{key.inspect}) shortcut because path is not available"
end
else
key
end
end
Defined in actionpack/lib/action_view/helpers/translation_helper.rb line 71
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::TranslationHelper