instance method
controller
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
controller(controller, options={})
Scopes routes to a specific controller
Example:
controller "food" do match "bacon", :action => "bacon" end
Parameters
-
controllerreq -
optionsopt = {}
Source
# File actionpack/lib/action_dispatch/routing/mapper.rb, line 634
def controller(controller, options={})
options[:controller] = controller
scope(options) { yield }
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 634
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Scoping