diff options
author | Ryan Bigg <radarlistener@gmail.com> | 2010-11-24 09:31:29 +1100 |
---|---|---|
committer | Ryan Bigg <radarlistener@gmail.com> | 2010-11-24 09:31:29 +1100 |
commit | e4a9af186a7316e2de018ff9306442b9fe0f2400 (patch) | |
tree | aaecb88c74f745caf56e845d015d073a647c95ff /actionpack/lib | |
parent | fd47a4bf438e37a20756e0341cd7cd4e472fd3cb (diff) | |
download | rails-e4a9af186a7316e2de018ff9306442b9fe0f2400.tar.gz rails-e4a9af186a7316e2de018ff9306442b9fe0f2400.tar.bz2 rails-e4a9af186a7316e2de018ff9306442b9fe0f2400.zip |
Add mention of nested resource to resources documentation
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f4d31eeff1..fb1f0d3f0c 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -968,6 +968,21 @@ module ActionDispatch # PUT /photos/:id # DELETE /photos/:id # + # Resources can also be nested infinitely by using this block syntax: + # + # resources :photos do + # resources :comments + # end + # + # This generates the following comments routes: + # + # GET /photos/:id/comments/new + # POST /photos/:id/comments + # GET /photos/:id/comments/:id + # GET /photos/:id/comments/:id/edit + # PUT /photos/:id/comments/:id + # DELETE /photos/:id/comments/:id + # # === Supported options # [:path_names] # Allows you to change the paths of the seven default actions. |