1
0
Fork 0
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:
Ryan Bigg 2010-11-07 11:49:57 +10:00
parent 5f7f3adccd
commit e5eece41b5

View file

@ -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 }