method

build_cache

rails latest stable - Class: ActionDispatch::Journey::Formatter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v5.0.0.1) is shown here.

build_cache()
private

No documentation available.

# File actionpack/lib/action_dispatch/journey/formatter.rb, line 161
        def build_cache
          root = { ___routes: [] }
          routes.routes.each_with_index do |route, i|
            leaf = route.required_defaults.inject(root) do |h, tuple|
              h[tuple] ||= {}
            end
            (leaf[:___routes] ||= []) << [i, route]
          end
          root
        end