提交 55d0e6f8 编写于 作者: A Aaron Patterson

push key checking up

We should disconnect `array_of_permitted_scalars_filter` from the
instance so that we can make hash filtering functional.  For now, pull
the conditional up out of that method
上级 8c147bcd
......@@ -649,7 +649,7 @@ def array_of_permitted_scalars?(value)
end
def array_of_permitted_scalars_filter(params, key)
if has_key?(key) && array_of_permitted_scalars?(self[key])
if array_of_permitted_scalars?(self[key])
params[key] = self[key]
end
end
......@@ -661,6 +661,7 @@ def hash_filter(params, filter)
# Slicing filters out non-declared keys.
slice(*filter.keys).each do |key, value|
next unless value
next unless has_key? key
if filter[key] == EMPTY_ARRAY
# Declaration { comment_ids: [] }.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册