instance method
match
Ruby on Rails 3.0.20
Since v3.0.20Signature
match(path, options=nil)
When you set up a regular route, you supply a series of symbols that Rails maps to parts of an incoming HTTP request.
match ':controller/:action/:id/:user_id'
Two of these symbols are special: :controller maps to the name of a controller in your application, and :action maps to the name of an action within that controller. Anything other than :controller or :action will be available to the action as part of params.
Parameters
-
pathreq -
optionsopt = nil
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 271
def match(path, options=nil)
mapping = Mapping.new(@set, @scope, path, options || {}).to_route
@set.add_route(*mapping)
self
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 271
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Base