diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2016-02-12 11:22:51 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2016-02-12 11:23:04 -0800 |
commit | b635eea70f8d13c555f529cef328aafabc4113d3 (patch) | |
tree | 59f1d7d6adcfeb8741b9d0ac028d6ab18465e578 | |
parent | 8c53b41293cd27a1d0c0b1d6d9f51f04f20ca465 (diff) | |
download | rails-b635eea70f8d13c555f529cef328aafabc4113d3.tar.gz rails-b635eea70f8d13c555f529cef328aafabc4113d3.tar.bz2 rails-b635eea70f8d13c555f529cef328aafabc4113d3.zip |
use kwargs to avoid hash slicing
we can use kwargs in this case to avoid values_at and except calls on
the options hash
-rw-r--r-- | actionview/lib/action_view/digestor.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionview/lib/action_view/digestor.rb b/actionview/lib/action_view/digestor.rb index 3a6cf63803..359b2f810c 100644 --- a/actionview/lib/action_view/digestor.rb +++ b/actionview/lib/action_view/digestor.rb @@ -57,9 +57,9 @@ module ActionView attr_reader :name, :finder, :options - def initialize(options) - @name, @finder = options.values_at(:name, :finder) - @options = options.except(:name, :finder) + def initialize(name:, finder:, **options) + @name, @finder = name, finder + @options = options end def digest |