From 4e2bc02163aa646ab1304b1b5bec98a7af8927f5 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Fri, 16 May 2008 00:43:03 +0200 Subject: minor revision in url_for docs Made explicit that RESTful and controller/action styles are not interchangeable, and revised some markup. --- actionpack/lib/action_view/helpers/url_helper.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb index 856cb0d79f..38c8d18cb0 100644 --- a/actionpack/lib/action_view/helpers/url_helper.rb +++ b/actionpack/lib/action_view/helpers/url_helper.rb @@ -120,9 +120,9 @@ module ActionView # exception. # # ==== Examples - # Because it relies on url_for, link_to supports both older-style controller/action/id arguments - # and newer RESTful routes. Current Rails style favors - # RESTful routes whenever possible, so use + # Because it relies on +url_for+, +link_to+ supports both older-style controller/action/id arguments + # and newer RESTful routes. Current Rails style favors RESTful routes whenever possible, so base + # your application on resources and use # # link_to "Profile", profile_path(@profile) # # => Profile @@ -132,9 +132,9 @@ module ActionView # link_to "Profile", @profile # # => Profile # - # in place of the more verbose + # in place of the older more verbose, non-resource-oriented # - # link_to "Profile", :controller => "profiles", :action => "show", :id => @profile.id + # link_to "Profile", :controller => "profiles", :action => "show", :id => @profile # # => Profile # # Similarly, @@ -162,7 +162,7 @@ module ActionView # link_to "WRONG!", :controller => "articles", :id => "news", :class => "article" # # => WRONG! # - # link_to can also produce links with anchors or query strings: + # +link_to+ can also produce links with anchors or query strings: # # link_to "Comment wall", profile_path(@profile, :anchor => "wall") # # => Comment wall @@ -173,7 +173,7 @@ module ActionView # link_to "Nonsense search", searches_path(:foo => "bar", :baz => "quux") # # => Nonsense search # - # The three options specfic to link_to (confirm, popup, and method) are used as follows: + # The three options specfic to +link_to+ (:confirm, :popup, and :method) are used as follows: # # link_to "Visit Other Site", "http://www.rubyonrails.org/", :confirm => "Are you sure?" # # => Visit Other Site -- cgit v1.2.3