From b635eea70f8d13c555f529cef328aafabc4113d3 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 12 Feb 2016 11:22:51 -0800 Subject: use kwargs to avoid hash slicing we can use kwargs in this case to avoid values_at and except calls on the options hash --- actionview/lib/action_view/digestor.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionview/lib/action_view/digestor.rb') 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 -- cgit v1.2.3