Class ActionController::Routing::RouteSet::Mapper
In: vendor/rails/actionpack/lib/action_controller/routing.rb
Parent: Object

Mapper instances are used to build routes. The object passed to the draw block in config/routes.rb is a Mapper instance.

Mapper instances have relatively few instance methods, in order to avoid clashes with named routes.

Methods

Public Class methods

[Source]

     # File vendor/rails/actionpack/lib/action_controller/routing.rb, line 944
944:         def initialize(set)
945:           @set = set
946:         end

Public Instance methods

Create an unnamed route with the provided path and options. See SomeHelpfulUrl for an introduction to routes.

[Source]

     # File vendor/rails/actionpack/lib/action_controller/routing.rb, line 950
950:         def connect(path, options = {})
951:           @set.add_route(path, options)
952:         end

[Source]

     # File vendor/rails/actionpack/lib/action_controller/routing.rb, line 958
958:         def method_missing(route_name, *args, &proc)
959:           super unless args.length >= 1 && proc.nil?
960:           @set.add_named_route(route_name, *args)
961:         end

[Source]

     # File vendor/rails/actionpack/lib/action_controller/routing.rb, line 954
954:         def named_route(name, path, options = {})
955:           @set.add_named_route(name, path, options)
956:         end

[Validate]