aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorMark Rushakoff <mark.rushakoff@gmail.com>2012-04-29 22:11:40 -0700
committerMark Rushakoff <mark.rushakoff@gmail.com>2012-04-29 22:11:40 -0700
commitdafb4d604a54d691132b89768c1e34dd0d7067ac (patch)
treeb46a8306d0d11d3464d2cb2a91c6c5d6b9ceef6c /actionpack/lib
parent60ebd00d4e228300d4a68363d2e574ce0e80a6cf (diff)
downloadrails-dafb4d604a54d691132b89768c1e34dd0d7067ac.tar.gz
rails-dafb4d604a54d691132b89768c1e34dd0d7067ac.tar.bz2
rails-dafb4d604a54d691132b89768c1e34dd0d7067ac.zip
Reword polymorphic routes + mounted engine rdoc
Also correctly indent its example code.
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_dispatch/routing/polymorphic_routes.rb14
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