scope_key_by_partial(key) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File actionview/lib/action_view/helpers/translation_helper.rb, line 125
        def scope_key_by_partial(key)
          stringified_key = key.to_s
          if stringified_key.first == "."
            if @virtual_path
              @_scope_key_by_partial_cache ||= {}
              @_scope_key_by_partial_cache[@virtual_path] ||= @virtual_path.gsub(%{/_?}, ".")
              "#{@_scope_key_by_partial_cache[@virtual_path]}#{stringified_key}"
            else
              raise "Cannot use t(#{key.inspect}) shortcut because path is not available"
            end
          else
            key
          end
        end
Register or log in to add new notes.