aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-04-06 13:01:12 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-04-06 13:01:12 +0530
commitc327ef4d65650743fbf49c8ba29016ecef70dd39 (patch)
tree8cf71d7adb7fe60ed537b3783bbd8d5ca19fab67 /actionpack
parent4ac719686c0075b6ad6896becfe0f058efdb97ff (diff)
parent92e6255b58ce445d23580b669dac67d80e64d411 (diff)
downloadrails-c327ef4d65650743fbf49c8ba29016ecef70dd39.tar.gz
rails-c327ef4d65650743fbf49c8ba29016ecef70dd39.tar.bz2
rails-c327ef4d65650743fbf49c8ba29016ecef70dd39.zip
Merge branch 'master' of github.com:lifo/docrails
Diffstat (limited to 'actionpack')
-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
#