mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Follow rails convention by using Array.wrap
This commit is contained in:
parent
528f405cdc
commit
ee044ea547
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue