Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 8188086

Browse files
committedApr 1, 2015
debug
1 parent 4df1c03 commit 8188086

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed
 

Diff for: ‎app/helpers/opal_helper.rb

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ def opal_tag(&block)
66
end
77

88
def javascript_include_tag(*sources)
9-
sources_copy = sources.dup.tap(&:extract_options!)
9+
options = sources.extract_options!.stringify_keys
1010
sprockets = Rails.application.assets
1111

12-
script_tags = super
12+
script_tags = []
1313

14-
sources_copy.map do |source|
14+
sources.map do |source|
15+
script_tags << super(source, options)
1516
loading_code = Opal::Processor.load_asset_code(sprockets, source)
1617
script_tags << javascript_tag(loading_code) if loading_code.present?
1718
end
18-
script_tags
19+
script_tags.inject(:<<)
1920
end
2021
end

0 commit comments

Comments
 (0)
Please sign in to comment.