diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-25 14:21:14 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-02-25 14:21:14 -0800 |
commit | c0c1441144aa5e477b3419b033e43c94adf7cc0c (patch) | |
tree | 864d671c0a83d38371536d6c69d846fa71f3ed21 | |
parent | 56b030605b4d968077a4ddb96b4ab619e75fb999 (diff) | |
download | rails-c0c1441144aa5e477b3419b033e43c94adf7cc0c.tar.gz rails-c0c1441144aa5e477b3419b033e43c94adf7cc0c.tar.bz2 rails-c0c1441144aa5e477b3419b033e43c94adf7cc0c.zip |
Convert `variant` to a keyword arg
-rw-r--r-- | actionview/lib/action_view/template.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionview/lib/action_view/template.rb b/actionview/lib/action_view/template.rb index cc5e0cbb4f..3c25a86b79 100644 --- a/actionview/lib/action_view/template.rb +++ b/actionview/lib/action_view/template.rb @@ -127,7 +127,7 @@ module ActionView attr_reader :source, :identifier, :handler, :original_encoding, :updated_at attr_reader :variable, :format - def initialize(source, identifier, handler, format: nil, **details) + def initialize(source, identifier, handler, format: nil, variant: nil, **details) unless format ActiveSupport::Deprecation.warn "ActionView::Template#initialize requires a format parameter" format = :html @@ -149,7 +149,7 @@ module ActionView @updated_at = details[:updated_at] || Time.now @format = format - @variants = [details[:variant]] + @variants = [variant] @compile_mutex = Mutex.new end |