diff --git a/lib/protector/dsl.rb b/lib/protector/dsl.rb index 522fbda..b2b2f97 100644 --- a/lib/protector/dsl.rb +++ b/lib/protector/dsl.rb @@ -159,7 +159,7 @@ def cannot(action, *fields) # Checks whether given field of a model is readable in context of current subject def readable?(field) - @access[:read] && @access[:read].key?(field.to_s) + Array.wrap(field).all? { |f| @access[:read] && @access[:read].key?(f.to_s) } end # Checks whether you can create a model with given field in context of current subject