From 734994c97f5ef71cc195e70063298cd0ee808dbd Mon Sep 17 00:00:00 2001 From: Giles Bowkett Date: Mon, 16 Mar 2009 15:17:06 -0700 Subject: [PATCH] docs/comment referred to nonexistent key :href_options. actual code responds to :html --- actionpack/lib/action_view/helpers/text_helper.rb | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb index 48bf471..573b99b 100644 --- a/actionpack/lib/action_view/helpers/text_helper.rb +++ b/actionpack/lib/action_view/helpers/text_helper.rb @@ -324,7 +324,7 @@ module ActionView # 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. Possible values for :link are :all (default), + # :html. 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. # @@ -341,7 +341,7 @@ module ActionView # # => "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, :href_options => { :target => '_blank' }) do |text| + # auto_link(post_body, :html => { :target => '_blank' }) do |text| # truncate(text, 15) # end # # => "Welcome to my new blog at http://www.m.... @@ -359,7 +359,7 @@ module ActionView # auto_link(post_body, :all, :target => "_blank") # => Once upon\na time # # => "Welcome to my new blog at http://www.myblog.com. # Please e-mail me at me@email.com." - def auto_link(text, *args, &block)#link = :all, href_options = {}, &block) + def auto_link(text, *args, &block)#link = :all, html = {}, &block) return '' if text.blank? options = args.size == 2 ? {} : args.extract_options! # this is necessary because the old auto_link API has a Hash as its last parameter -- 1.5.3.4