Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add :module option documentation for the resources method

  • Loading branch information...
commit 2b13f845a0f9abebaeb174ab6caaff2c5cee29b5 1 parent 0f63a8a
@radar radar authored fxn committed
Showing with 8 additions and 0 deletions.
  1. +8 −0 actionpack/lib/action_dispatch/routing/mapper.rb
View
8 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -933,6 +933,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.
@@ -941,6 +942,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!
Please sign in to comment.
Something went wrong with that request. Please try again.