Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

auto_link does not add attributes to hrefs like the docs describe

#3241

This is only a problem with the "new" API for auto_link, the old API works fine. An example from the console:

$ script/console
Loading development environment (Rails 2.3.4)
>> include ActionView::Helpers::TextHelper
=> Object
>> include ActionView::Helpers::TagHelper
=> Object

# The docs say this should work:
>> auto_link("http://google.com", :href_options => { :target => "_blank" })
=> "<a href=\"http://google.com\">http://google.com</a>"

# This works:
>> auto_link("http://google.com", :urls, :target => "_blank")
=> "<a href=\"http://google.com\" target=\"_blank\">http://google.com</a>"

Reported by javan (at javan) · September 21st, 2009 @ 09:21 PM

State: resolved
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from auto_link to auto_link, bugmash

    September 25th, 2009 @ 11:56 AM

  2. Lena Herrmann
    Lena Herrmann

    This is actually an error in the documentation, it can be fixed with patch in ticket #2261 auto_link docs patch. That patch has been applied to docrails, but not to the actual rails code.

    September 26th, 2009 @ 04:30 PM

  3. Lena Herrmann
    Lena Herrmann
    • Tag changed from auto_link, bugmash to auto_link, bugmash, bugmash-review

    September 26th, 2009 @ 04:38 PM

  4. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from auto_link, bugmash, bugmash-review to auto_link
    • State changed from new to resolved

    Thanks for the sleuthing, Lena. The docrails patch will make its way back to the main tree eventually, so we can close this one out.

    September 27th, 2009 @ 12:09 PM