Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Document the controller method for AD's Mapper

  • Loading branch information...
commit e5eece41b5ac740f8a137b3228d052273c641099 1 parent 5f7f3ad
@radar radar authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
6 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -518,6 +518,12 @@ def scope(*args)
@scope[:blocks] = recover[:block]
end
+ # Scopes routes to a specific controller
+ #
+ # Example:
+ # controller "food" do
+ # match "bacon", :action => "bacon"
+ # end
def controller(controller, options={})
options[:controller] = controller
scope(options) { yield }
Please sign in to comment.
Something went wrong with that request. Please try again.