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.

When specifying url, form should be generated with it, but not this.href

#2254

In helpers/url_helper.rb was the following code:


when confirm && method
     "if (#{confirm_javascript_function(confirm)}) { #{method_javascript_function(method)} };return false;"
when method
     "#{method_javascript_function(method, url, href)}return false;"

It means, that when I pass :href to link_to helper, my url was not used.

I've provided patch with test.

Reported by Max Lapshin · March 16th, 2009 @ 03:23 PM

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

Activity

  1. Max Lapshin
    Max Lapshin

    Hey, what's the problem? There is bug, which is illustrated in test and a fix.

    April 5th, 2009 @ 02:40 PM

  2. Henrik Nyh
    Henrik Nyh
    • Tag changed from 2.3-rc2, link_to, url_helper to 2.3-rc2, link_to, patch, url_helper

    April 5th, 2009 @ 03:29 PM

  3. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3-rc2, link_to, patch, url_helper to 2.3-rc2, link_to, url_helper

    There's not necessarily a problem. Core team is doing some post-2.3.2 planning right now, so not many patches are being applied.

    April 5th, 2009 @ 03:29 PM

  4. Max Lapshin
    Max Lapshin
    • Tag changed from 2.3-rc2, link_to, url_helper to 2.3.2, bug, link_to, patch, test, url_helper

    Why not a problem? I've accepted patch, with test, which shows, that implementation violates documentation.

    April 20th, 2009 @ 03:17 PM

  5. Max Lapshin
    Max Lapshin

    I've repeated this patch again 2.3.2, it is still actual

    April 20th, 2009 @ 03:23 PM

  6. CancelProfileIsBroken
    CancelProfileIsBroken

    No one is saying it's a bad patch. You asked what the problem was. I tried to explain. Patches don't get instantly applied, that's all.

    April 20th, 2009 @ 03:33 PM

  7. Max Lapshin
  8. Max Lapshin
    Max Lapshin
    • Title changed from When specifying url, form should be generated with it, but not this.href to [PATCH] When specifying url, form should be generated with it, but not this.href

    April 20th, 2009 @ 03:48 PM

  9. Pratik
    Pratik
    • Title changed from [PATCH] When specifying url, form should be generated with it, but not this.href to When specifying url, form should be generated with it, but not this.href

    April 20th, 2009 @ 03:52 PM

  10. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from 2.3.2, bug, link_to, patch, test, url_helper to 2.3.2, bug, bugmash, link_to, patch, test, url_helper

    August 6th, 2009 @ 01:51 PM

  11. Rizwan Reza
    Rizwan Reza

    verified

    +1 This works in master and 2-3-stable. All tests pass. Also tested manually via a test app.

    August 8th, 2009 @ 01:34 PM

  12. David Trasbo
    David Trasbo

    +1

    Patch applies cleanly to edge. All tests are passing.

    August 8th, 2009 @ 04:30 PM

  13. David Trasbo
  14. Elad Meidar
    Elad Meidar

    +1 verified, +1 on patch, applies cleanly to 2-3-stable and master, all tests pass. manually tested on a mini test application.

    August 9th, 2009 @ 05:52 PM

  15. Tristan Dunn
    Tristan Dunn
    • Tag changed from 2.3.2, bug, bugmash, link_to, patch, test, url_helper to 2.3.2, bug, bugmash, link_to, patch, test, url_helper, verified

    +1

    Verified patch applies to master and 2-3-stable cleanly with passing tests.

    August 9th, 2009 @ 11:04 PM

  16. Repository
  17. Repository
  18. CancelProfileIsBroken
    CancelProfileIsBroken
    • Assigned user cleared.
    • Tag changed from 2.3.2, bug, bugmash, link_to, patch, test, url_helper, verified to 2.3.2, bug, link_to, patch, test, url_helper, verified
    • Milestone cleared.

    August 10th, 2009 @ 02:15 AM