aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
diff options
context:
space:
mode:
authorAvnerCohen <israbirding@gmail.com>2012-10-31 21:19:44 +0200
committerAvnerCohen <israbirding@gmail.com>2012-10-31 21:19:44 +0200
commitd20a52930aa80d7f219465d6fc414a68b16ef2a8 (patch)
tree599a0f021b1b8a321fe0fafb426a885ae534f4c5 /actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
parentbe4a4cd38ff2c2db0f6b69bb72fb3557bd5a6e21 (diff)
downloadrails-d20a52930aa80d7f219465d6fc414a68b16ef2a8.tar.gz
rails-d20a52930aa80d7f219465d6fc414a68b16ef2a8.tar.bz2
rails-d20a52930aa80d7f219465d6fc414a68b16ef2a8.zip
1.9 hash syntax changes to docs
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/polymorphic_routes.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/polymorphic_routes.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
index 3d7b8878b8..497ac3d545 100644
--- a/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
+++ b/actionpack/lib/action_dispatch/routing/polymorphic_routes.rb
@@ -34,7 +34,7 @@ module ActionDispatch
# == Prefixed polymorphic helpers
#
# In addition to <tt>polymorphic_url</tt> and <tt>polymorphic_path</tt> methods, a
- # number of prefixed helpers are available as a shorthand to <tt>:action => "..."</tt>
+ # number of prefixed helpers are available as a shorthand to <tt>action: "..."</tt>
# in options. Those are:
#
# * <tt>edit_polymorphic_url</tt>, <tt>edit_polymorphic_path</tt>
@@ -43,7 +43,7 @@ module ActionDispatch
# Example usage:
#
# edit_polymorphic_path(@post) # => "/posts/1/edit"
- # polymorphic_path(@post, :format => :pdf) # => "/posts/1.pdf"
+ # polymorphic_path(@post, format: :pdf) # => "/posts/1.pdf"
#
# == Usage with mounted engines
#
@@ -132,7 +132,7 @@ module ActionDispatch
end
# Returns the path component of a URL for the given record. It uses
- # <tt>polymorphic_url</tt> with <tt>:routing_type => :path</tt>.
+ # <tt>polymorphic_url</tt> with <tt>routing_type: :path</tt>.
def polymorphic_path(record_or_hash_or_array, options = {})
polymorphic_url(record_or_hash_or_array, options.merge(:routing_type => :path))
end