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.

compute_public_path adds an extension to a source w/ a querystring

#979

compute_public_path in ActionView::Helpers::AssetTagHelper adds an extension (.js, .css, etc.) to a source that was supplied with a querystring, so this:


  <%= javascript_src_tag "http://fakedomain/foo?some_val=1" %>

looks like


  <script type="text/javascript" src="http://fakedomain/foo?some_val=1.js"></script>

Attached is a patch that inserts an existence check for "?" before adding the extension.

Reported by netshade · September 5th, 2008 @ 07:06 PM

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

Activity

  1. DHH
    DHH
    • State changed from new to incomplete

    Looks good, needs test (change ticket status to verified when added).

    September 10th, 2008 @ 05:19 AM

  2. netshade
    netshade

    Tests modified in included patch

    September 10th, 2008 @ 03:04 PM

  3. netshade
    netshade

    (as a side note, i don't have the ability to change ticket status, if the "change ticket status" was directed to me)

    September 10th, 2008 @ 04:06 PM

  4. DHH
    DHH

    This no longer seems to apply cleanly against master. Could you create a new, single patch against master?

    November 8th, 2008 @ 12:42 PM

  5. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from action_view, helper, patch to action_view, bugmash, helper, patch

    August 3rd, 2009 @ 07:37 PM

  6. Jatinder Singh
    Jatinder Singh

    This is not longer valid, as the latest changes in compute_public_path only add extensions to files, and not URIs.

    August 9th, 2009 @ 11:29 AM

  7. Rizwan Reza
    Rizwan Reza

    verified

    +1 This bug is present.

    javascript_path("http://fake.domain/super/xmlhr?callback=fake")
    
    # should be this
    # => http://fake.domain/super/xmlhr?callback=fake 
    
    # right now...
    # => http://fake.domain/super/xmlhr?callback=fake.js
    

    August 9th, 2009 @ 08:36 PM

  8. Rizwan Reza
    Rizwan Reza

    not reproducible in master.

    August 9th, 2009 @ 08:39 PM

  9. Rizwan Reza
    Rizwan Reza

    This patch works for 2-3-stable, backports the functionality from master.

    August 9th, 2009 @ 09:53 PM

  10. Rizwan Reza
  11. Jeremy Kemper
    Jeremy Kemper
    • Tag changed from action_view, bugmash, helper, patch to action_view, helper, patch
    • State changed from incomplete to wontfix
    • Milestone cleared.

    Resolved that we shouldn't break compat.

    August 9th, 2009 @ 11:14 PM

  12. Rizwan Reza
    Rizwan Reza
    • Tag changed from action_view, helper, patch to action_view, bugmash, helper, patch

    This is no longer being applied, please close the ticket.

    August 9th, 2009 @ 11:15 PM

  13. CancelProfileIsBroken
    CancelProfileIsBroken
    • Tag changed from action_view, bugmash, helper, patch to action_view, helper, patch

    August 9th, 2009 @ 11:16 PM