Permalink
Browse files

Add :module option documentation for the resources method

  • Loading branch information...
1 parent 2974f57 commit 01af50d8b6be7b167c30f29c7407ce88bdfc9b2a @radar radar committed Nov 23, 2010
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -967,6 +967,7 @@ def resource(*resources, &block)
# GET /photos/:id/edit
# PUT /photos/:id
# DELETE /photos/:id
+ #
# === Supported options
# [:path_names]
# Allows you to change the paths of the seven default actions.
@@ -975,6 +976,13 @@ def resource(*resources, &block)
# resources :posts, :path_names => { :new => "brand_new" }
#
# The above example will now change /posts/new to /posts/brand_new
+ #
+ # [:module]
+ # Set the module where the controller can be found. Defaults to nothing.
+ #
+ # resources :posts, :module => "admin"
+ #
+ # All requests to the posts resources will now go to +Admin::PostsController+.
def resources(*resources, &block)
options = resources.extract_options!

0 comments on commit 01af50d

Please sign in to comment.