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.

application.js is added twice when :defaults expansion is redefined

#5938

When redefining config.action_view.javascript_expansions[:defaults] in a way that it includes application, using javascript_include_tag will add the application.js script twice to the template.

It could be just said that by rule, one should never add application to a :default expansion, but the attached patch makes sure that application.js is included only once and in a way that doesn't break other tests (at the end).

Reported by zaki · November 9th, 2010 @ 04:36 PM

State: committed
Milestone: none
Assigned to: Santiago Pastorino Santiago Pastorino
Importance: Low

Activity

  1. zaki
    zaki
    • Tag changed from javascript_expansions, javascript_include_tag to javascript_expansions, javascript_include_tag, patch

    November 9th, 2010 @ 04:45 PM

  2. Santiago Pastorino
    Santiago Pastorino
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    February 11th, 2011 @ 07:18 PM

  3. Santiago Pastorino
    Santiago Pastorino
    • State changed from open to stale

    February 11th, 2011 @ 07:18 PM

  4. Josh Kalderimis
    Josh Kalderimis
    • State changed from stale to open
    • Tag changed from javascript_expansions, javascript_include_tag, patch to actionpack, asset_tag_helper

    After talking to José about this, it seems the solution to the issue requires a bit of a reworking.

    I am currently working on a patch which will take care of this issue but also other issues found when reading into the tests, the main problem being that javascript_include_tag allows for duplicate asset tags, which is the root cause of this issue.

    Ticket reopened and patch on its way.

    [state:open]

    February 12th, 2011 @ 04:47 PM

  5. Josh Kalderimis
    Josh Kalderimis
    • Assigned user set to Santiago Pastorino

    This issue can now be closed as it is resolved by https://github.com/rails/rails/commit/1363bb8f7215fadb65e9296217be2... in master.

    February 12th, 2011 @ 10:30 PM

  6. rails
    rails
    • State changed from open to committed
    • Importance changed from to Low

    February 12th, 2011 @ 11:44 PM

  7. af001
    af001

    私の中で、総合評価のとっても低いアバアバクロホリスタークロ銀座店。アバクロは大好きなんですけどね。一昨日の東京駅付近での打ち合わせの後、散歩がてら久々に行ってきました。そしたらビックリ!相変わらアバクロず、踊っているだけの店員さんとかもいましたが、

    May 5th, 2011 @ 02:56 AM