1
0
Fork 0
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:
Alexander Uvarov 2011-06-23 23:06:52 +06:00
parent 528f405cdc
commit ee044ea547

View file

@ -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