diff options
Diffstat (limited to 'activemodel')
-rw-r--r-- | activemodel/lib/active_model/mass_assignment_security.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/mass_assignment_security.rb b/activemodel/lib/active_model/mass_assignment_security.rb index ff8732a33e..c04de5b9a4 100644 --- a/activemodel/lib/active_model/mass_assignment_security.rb +++ b/activemodel/lib/active_model/mass_assignment_security.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/class/attribute' require 'active_support/core_ext/string/inflections' +require 'active_support/core_ext/array/wrap' require 'active_model/mass_assignment_security/permission_set' require 'active_model/mass_assignment_security/sanitizer' @@ -112,7 +113,7 @@ module ActiveModel self._protected_attributes = protected_attributes_configs.dup - Array(role).each do |name| + Array.wrap(role).each do |name| self._protected_attributes[name] = self.protected_attributes(name) + args end @@ -174,7 +175,7 @@ module ActiveModel self._accessible_attributes = accessible_attributes_configs.dup - Array(role).each do |name| + Array.wrap(role).each do |name| self._accessible_attributes[name] = self.accessible_attributes(name) + args end |