diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 8b1578769dff50d8065d8df457216098d5e8a196..1f3a831b7f3ed8ee5855fab5c3b5751eca6c824e 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/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!