instance method
controller
Ruby on Rails 3.1.12
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 651
def controller(controller, options={})
options[:controller] = controller
scope(options) { yield }
end
Defined in actionpack/lib/action_dispatch/routing/mapper.rb line 651
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionDispatch::Routing::Mapper::Scoping