Permalink
Browse files

Document the controller method for AD's Mapper

  • Loading branch information...
1 parent afc16f6 commit 467d5844eb56ab354edc89fc8fe3eba5054136e7 @radar radar committed with fxn Nov 7, 2010
Showing with 6 additions and 0 deletions.
  1. +6 −0 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -486,6 +486,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 }

0 comments on commit 467d584

Please sign in to comment.