instance method scope_option_by_partial

Ruby on Rails edge

Since edge Private — implementation detail, not part of the public API

Signature

scope_option_by_partial(scope)

No documentation comment.

Parameters

scope req
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

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close