I’ve created a small patch wherein I’ve added an extra parameter to the ‘javascript_include_tag’ (:unique => true) which will remove duplicate sources.
The reason for this is you can define javascript_expansion per functionality, not so much per group of sources. If so, you could end up with duplicate sources.
Imagine these 2 expansions:
:robber => [‘bank’, ‘robber’]
:banker => [‘bank’, ‘banker’]
the normal behavoir would expand to these sources:
I have created this option instead making it the default behavior because:
I didn’t want to change the existing tests as perhaps people still want to include whatever they want without having rails altering their logic/way of working. Perhaps making it default true with the option to set it to false.