From b047929c14f088d535eea460ddd8769f43cd4ae5 Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Sun, 2 Nov 2008 04:02:40 +0530 Subject: Merge with docrails --- actionpack/lib/action_view/helpers/text_helper.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'actionpack/lib/action_view') diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 3af7440400..d80e7c6e57 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -344,9 +344,9 @@ module ActionView text << "

" end - # Turns all URLs and e-mail addresses into clickable links. The +link+ parameter + # Turns all URLs and e-mail addresses into clickable links. The :link option # will limit what should be linked. You can add HTML attributes to the links using - # +href_options+. Options for +link+ are :all (default), + # :href_options. Possible values for :link are :all (default), # :email_addresses, and :urls. If a block is given, each URL and # e-mail address is yielded and the result is used as the link text. # @@ -355,15 +355,15 @@ module ActionView # # => "Go to http://www.rubyonrails.org and # # say hello to david@loudthinking.com" # - # auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :urls) + # auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :link => :urls) # # => "Visit http://www.loudthinking.com/ # # or e-mail david@loudthinking.com" # - # auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :email_addresses) + # auto_link("Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com", :link => :email_addresses) # # => "Visit http://www.loudthinking.com/ or e-mail david@loudthinking.com" # # post_body = "Welcome to my new blog at http://www.myblog.com/. Please e-mail me at me@email.com." - # auto_link(post_body, :all, :target => '_blank') do |text| + # auto_link(post_body, :href_options => { :target => '_blank' }) do |text| # truncate(text, 15) # end # # => "Welcome to my new blog at http://www.m.... -- cgit v1.2.3