We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4df1c03 commit 8188086Copy full SHA for 8188086
app/helpers/opal_helper.rb
@@ -6,15 +6,16 @@ def opal_tag(&block)
6
end
7
8
def javascript_include_tag(*sources)
9
- sources_copy = sources.dup.tap(&:extract_options!)
+ options = sources.extract_options!.stringify_keys
10
sprockets = Rails.application.assets
11
12
- script_tags = super
+ script_tags = []
13
14
- sources_copy.map do |source|
+ sources.map do |source|
15
+ script_tags << super(source, options)
16
loading_code = Opal::Processor.load_asset_code(sprockets, source)
17
script_tags << javascript_tag(loading_code) if loading_code.present?
18
- script_tags
19
+ script_tags.inject(:<<)
20
21
0 commit comments