diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-11-02 04:02:40 +0530 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-11-02 04:02:40 +0530 |
commit | b047929c14f088d535eea460ddd8769f43cd4ae5 (patch) | |
tree | 221d816ef0c908044fd6029950ccad064866ab8f /actionpack/lib | |
parent | 5a02f0bccf55191c2cfbcc69bd8165df6d7a2012 (diff) | |
download | rails-b047929c14f088d535eea460ddd8769f43cd4ae5.tar.gz rails-b047929c14f088d535eea460ddd8769f43cd4ae5.tar.bz2 rails-b047929c14f088d535eea460ddd8769f43cd4ae5.zip |
Merge with docrails
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/base.rb | 3 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/text_helper.rb | 10 |
2 files changed, 8 insertions, 5 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb index 74c04147fb..cf86c5eed0 100644 --- a/actionpack/lib/action_controller/base.rb +++ b/actionpack/lib/action_controller/base.rb @@ -1062,6 +1062,9 @@ module ActionController #:nodoc: # When using <tt>redirect_to :back</tt>, if there is no referrer, # RedirectBackError will be raised. You may specify some fallback # behavior for this case by rescuing RedirectBackError. + # + # When using <tt>redirect_to</tt> an instance variable called + # @performed_redirect will be set to true. def redirect_to(options = {}, response_status = {}) #:doc: raise ActionControllerError.new("Cannot redirect to nil!") if options.nil? 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 << "</p>" 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 <tt>:link</tt> option # will limit what should be linked. You can add HTML attributes to the links using - # +href_options+. Options for +link+ are <tt>:all</tt> (default), + # <tt>:href_options</tt>. Possible values for <tt>:link</tt> are <tt>:all</tt> (default), # <tt>:email_addresses</tt>, and <tt>:urls</tt>. 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 <a href=\"http://www.rubyonrails.org\">http://www.rubyonrails.org</a> and # # say hello to <a href=\"mailto:david@loudthinking.com\">david@loudthinking.com</a>" # - # 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 <a href=\"http://www.loudthinking.com/\">http://www.loudthinking.com/</a> # # 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 <a href=\"mailto:david@loudthinking.com\">david@loudthinking.com</a>" # # 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 <a href=\"http://www.myblog.com/\" target=\"_blank\">http://www.m...</a>. |