mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Document the controller method for AD's Mapper
This commit is contained in:
parent
5f7f3adccd
commit
e5eece41b5
1 changed files with 6 additions and 0 deletions
|
@ -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 }
|
||||
|
|
Loading…
Reference in a new issue