method

define_mounted_helper

Importance_0
v3.2.13 - Show latest stable - 0 notes - Class: ActionDispatch::Routing::RouteSet
define_mounted_helper(name) public

No documentation

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

Hide source
# File actionpack/lib/action_dispatch/routing/route_set.rb, line 319
      def define_mounted_helper(name)
        return if MountedHelpers.method_defined?(name)

        routes = self
        MountedHelpers.class_eval do
          define_method "_#{name}" do
            RoutesProxy.new(routes, self._routes_context)
          end
        end

        MountedHelpers.class_eval           def #{name}            @#{name} ||= _#{name}          end
      end
Register or log in to add new notes.