Skip to content

Commit 18c08f3

Browse files
committed
Use new hash syntax
We only support Ruby >= 1.9
1 parent 193e80c commit 18c08f3

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/sprockets/rails/helper.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,21 +125,21 @@ def javascript_include_tag(*sources)
125125

126126
if options["debug"] != false && request_debug_assets?
127127
sources.map { |source|
128-
if asset = lookup_debug_asset(source, :type => :javascript)
128+
if asset = lookup_debug_asset(source, type: :javascript)
129129
if asset.respond_to?(:to_a)
130130
asset.to_a.map do |a|
131-
super(path_to_javascript(a.logical_path, :debug => true), options)
131+
super(path_to_javascript(a.logical_path, debug: true), options)
132132
end
133133
else
134-
super(path_to_javascript(asset.logical_path, :debug => true), options)
134+
super(path_to_javascript(asset.logical_path, debug: true), options)
135135
end
136136
else
137137
super(source, options)
138138
end
139139
}.flatten.uniq.join("\n").html_safe
140140
else
141141
sources.map { |source|
142-
options = options.merge('integrity' => asset_integrity(source, :type => :javascript)) if integrity
142+
options = options.merge('integrity' => asset_integrity(source, type: :javascript)) if integrity
143143
super source, options
144144
}.join("\n").html_safe
145145
end
@@ -154,21 +154,21 @@ def stylesheet_link_tag(*sources)
154154

155155
if options["debug"] != false && request_debug_assets?
156156
sources.map { |source|
157-
if asset = lookup_debug_asset(source, :type => :stylesheet)
157+
if asset = lookup_debug_asset(source, type: :stylesheet)
158158
if asset.respond_to?(:to_a)
159159
asset.to_a.map do |a|
160-
super(path_to_stylesheet(a.logical_path, :debug => true), options)
160+
super(path_to_stylesheet(a.logical_path, debug: true), options)
161161
end
162162
else
163-
super(path_to_stylesheet(asset.logical_path, :debug => true), options)
163+
super(path_to_stylesheet(asset.logical_path, debug: true), options)
164164
end
165165
else
166166
super(source, options)
167167
end
168168
}.flatten.uniq.join("\n").html_safe
169169
else
170170
sources.map { |source|
171-
options = options.merge('integrity' => asset_integrity(source, :type => :stylesheet)) if integrity
171+
options = options.merge('integrity' => asset_integrity(source, type: :stylesheet)) if integrity
172172
super source, options
173173
}.join("\n").html_safe
174174
end

0 commit comments

Comments
 (0)