module ActionDispatch::Routing::Mapper::Scoping
def controller(controller)
match "bacon", action: :bacon, via: :get
controller "food" do
Scopes routes to a specific controller
def controller(controller) @scope = @scope.new(controller: controller) yield ensure @scope = @scope.parent end