diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2012-05-01 19:06:03 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2012-05-01 19:06:03 +0530 |
commit | 42ff22f33a8963f1a1352f98e83b9918aa1a160d (patch) | |
tree | 3f43a8acee3ab20de78c4c9e30792296fddd06e4 /actionpack/lib/action_dispatch/routing | |
parent | 3cc6995e714bc763b40eb3e1d710c1e5ded44384 (diff) | |
parent | 339602b219e1fd842599f6750eb965f327a995c4 (diff) | |
download | rails-42ff22f33a8963f1a1352f98e83b9918aa1a160d.tar.gz rails-42ff22f33a8963f1a1352f98e83b9918aa1a160d.tar.bz2 rails-42ff22f33a8963f1a1352f98e83b9918aa1a160d.zip |
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/polymorphic_routes.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb index 013cf93dbc..8fde667108 100644 --- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb +++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb @@ -43,16 +43,14 @@ module ActionDispatch # edit_polymorphic_path(@post) # => "/posts/1/edit" # polymorphic_path(@post, :format => :pdf) # => "/posts/1.pdf" # - # == Using with mounted engines + # == Usage with mounted engines # - # If you use mounted engine, there is a possibility that you will need to use - # polymorphic_url pointing at engine's routes. To do that, just pass proxy used - # to reach engine's routes as a first argument: + # If you are using a mounted engine and you need to use a polymorphic_url + # pointing at the engine's routes, pass in the engine's route proxy as the first + # argument to the method. For example: # - # For example: - # - # polymorphic_url([blog, @post]) # it will call blog.post_path(@post) - # form_for([blog, @post]) # => "/blog/posts/1 + # polymorphic_url([blog, @post]) # calls blog.post_path(@post) + # form_for([blog, @post]) # => "/blog/posts/1" # module PolymorphicRoutes # Constructs a call to a named RESTful route for the given record and returns the |