mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Document the controller method for AD's Mapper
This commit is contained in:
@@ -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 }
|
||||
|
||||
Reference in New Issue
Block a user