instance method
scope_key_by_partial
Ruby on Rails edge
Since v3.0.20 Private — implementation detail, not part of the public APISignature
scope_key_by_partial(key)
No documentation comment.
Parameters
-
keyreq
Source
# File actionview/lib/action_view/helpers/translation_helper.rb, line 141
def scope_key_by_partial(key)
if key&.start_with?(".")
if @virtual_path
"#{scope_prefix}#{key}"
else
raise "Cannot use t(#{key.inspect}) shortcut because path is not available"
end
else
key
end
end
Defined in actionview/lib/action_view/helpers/translation_helper.rb line 141
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::TranslationHelper