提交 e4c3225b 编写于 作者: A Aaron Patterson

convert `digest` to only use kwargs

上级 d72c5df1
......@@ -22,10 +22,8 @@ class << self
# * <tt>finder</tt> - An instance of <tt>ActionView::LookupContext</tt>
# * <tt>dependencies</tt> - An array of dependent views
# * <tt>partial</tt> - Specifies whether the template is a partial
def digest(name:, finder:, **options)
options.assert_valid_keys(:dependencies, :partial)
dependencies = Array.wrap(options[:dependencies])
def digest(name:, finder:, dependencies: [])
dependencies ||= []
cache_key = ([ name, finder.details_key.hash ].compact + dependencies).join('.')
# this is a correctly done double-checked locking idiom
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册