diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-09-01 07:23:01 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2016-09-01 07:23:01 +0900 |
commit | c762a24a61a5f54247142d291487206d3187671a (patch) | |
tree | bd32a9f88ebbcda5a7feabd96da94a352db5b0ab | |
parent | fd2446cd8156f288598cdb47172cfe31ec24c1ee (diff) | |
download | rails-c762a24a61a5f54247142d291487206d3187671a.tar.gz rails-c762a24a61a5f54247142d291487206d3187671a.tar.bz2 rails-c762a24a61a5f54247142d291487206d3187671a.zip |
remove warning from `video_tag`
This removes the following warning.
```
actionview/lib/action_view/helpers/asset_tag_helper.rb:291: warning: shadowing outer local variable - options
```
-rw-r--r-- | actionview/lib/action_view/helpers/asset_tag_helper.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/helpers/asset_tag_helper.rb b/actionview/lib/action_view/helpers/asset_tag_helper.rb index 2b9c1a8ceb..b1563ac490 100644 --- a/actionview/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionview/lib/action_view/helpers/asset_tag_helper.rb @@ -288,9 +288,9 @@ module ActionView options = sources.extract_options!.symbolize_keys public_poster_folder = options.delete(:poster_skip_pipeline) sources << options - multiple_sources_tag_builder("video", sources) do |options| - options[:poster] = path_to_image(options[:poster], skip_pipeline: public_poster_folder) if options[:poster] - options[:width], options[:height] = extract_dimensions(options.delete(:size)) if options[:size] + multiple_sources_tag_builder("video", sources) do |tag_options| + tag_options[:poster] = path_to_image(tag_options[:poster], skip_pipeline: public_poster_folder) if tag_options[:poster] + tag_options[:width], tag_options[:height] = extract_dimensions(tag_options.delete(:size)) if tag_options[:size] end end |