From e5eece41b5ac740f8a137b3228d052273c641099 Mon Sep 17 00:00:00 2001 From: Ryan Bigg Date: Sun, 7 Nov 2010 11:49:57 +1000 Subject: Document the controller method for AD's Mapper --- actionpack/lib/action_dispatch/routing/mapper.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/lib/action_dispatch') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index e760eb0196..48afca56d8 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -518,6 +518,12 @@ module ActionDispatch @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 } -- cgit v1.2.3