Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #2696 from guilleiguaran/string-keys-sprockets-hel…

…pers

Removing redundant stringify_keys in Sprockets helpers
  • Loading branch information...
commit abab6122fcf72909701879e518fa96a927f61bc1 1 parent 9c33576
@spastorino spastorino authored
Showing with 4 additions and 4 deletions.
  1. +4 −4 actionpack/lib/sprockets/helpers/rails_helper.rb
View
8 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -26,10 +26,10 @@ def javascript_include_tag(*sources)
sources.collect do |source|
if debug && asset = asset_paths.asset_for(source, 'js')
asset.to_a.map { |dep|
- javascript_include_tag(dep, options.stringify_keys.merge!({ :debug => false, :body => true }))
+ javascript_include_tag(dep, options.merge({ :debug => false, :body => true }))
}
else
- super(source.to_s, { 'src' => asset_path(source, 'js', body) }.merge!(options.stringify_keys))
+ super(source.to_s, { :src => asset_path(source, 'js', body) }.merge!(options))
end
end.join("\n").html_safe
end
@@ -42,10 +42,10 @@ def stylesheet_link_tag(*sources)
sources.collect do |source|
if debug && asset = asset_paths.asset_for(source, 'css')
asset.to_a.map { |dep|
- stylesheet_link_tag(dep, options.stringify_keys.merge!({ :debug => false, :body => true }))
+ stylesheet_link_tag(dep, options.merge({ :debug => false, :body => true }))
}
else
- super(source.to_s, { 'href' => asset_path(source, 'css', body, :request) }.merge!(options.stringify_keys))
+ super(source.to_s, { :href => asset_path(source, 'css', body, :request) }.merge!(options))
end
end.join("\n").html_safe
end
Please sign in to comment.
Something went wrong with that request. Please try again.