Skip to content

Commit dcc9b02

Browse files
committed
javascript_include_tag always adds a .js extension
For now work around by by making our own tag. Pull request rails/rails#11707 will correct on next version of Rails
1 parent 332eebc commit dcc9b02

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/jammit/helper.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,15 @@ def include_stylesheets(*packages)
2626
# except in development, where it references the individual scripts.
2727
def include_javascripts(*packages)
2828
options = packages.extract_options!
29+
options.merge!(:extname=>false)
2930
html_safe packages.map {|pack|
3031
should_package? ? Jammit.asset_url(pack, :js) : Jammit.packager.individual_urls(pack.to_sym, :js)
3132
}.flatten.map {|pack|
32-
javascript_include_tag pack, options
33+
# tag = javascript_include_tag pack, options
34+
tag = "<script src='#{pack}'></script>"
35+
# Rails.logger.warn tag
36+
# Rails.logger.warn
37+
tag
3338
}.join("\n")
3439
end
3540

0 commit comments

Comments
 (0)