aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2011-04-12 22:45:33 +0200
committerXavier Noria <fxn@hashref.com>2011-04-12 22:45:33 +0200
commit3366479a9a6db3101ffe3827a86be0e5b50f7a5a (patch)
treea9b4e813f32a99fa626152947862bb57edd23ed0 /actionpack/lib/action_view
parentb53ffb35e085362bb2690577ae123a1f4872c12a (diff)
parent40d156955c82c19b14494c1bf60ad48980e29a4e (diff)
downloadrails-3366479a9a6db3101ffe3827a86be0e5b50f7a5a.tar.gz
rails-3366479a9a6db3101ffe3827a86be0e5b50f7a5a.tar.bz2
rails-3366479a9a6db3101ffe3827a86be0e5b50f7a5a.zip
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 65b002ebad..de75488e72 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -81,9 +81,12 @@ module ActionView
# # => /workshops
#
# <%= url_for(@workshop) %>
- # # calls @workshop.to_s
+ # # calls @workshop.to_param which by default returns the id
# # => /workshops/5
#
+ # # to_param can be re-defined in a model to provide different URL names:
+ # # => /workshops/1-workshop-name
+ #
# <%= url_for("http://www.example.com") %>
# # => http://www.example.com
#