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