rails/rails — pull request #6668 by pomnikita (2012-06-07 21:56:08+00:00)
Title: Compact array of values added to PermissionSet instance

It is necessary to compact arrays with nil values.

For example, if we enforce
```ruby
config.active_record.whitelist_attributes = true
````
on_load hook will call attr_accessible(nil) on ActiveRecord
and it appears that ActiveRecord class attribute _accessible_attributes now is set to
```ruby
{ :default => # }
````
(https://github.com/rails/rails/blob/master/activemodel/lib/active_model/mass_assignment_security.rb#L183)

And when we try to set attr_accessible on any other model, for example
```ruby
class User < ActiveRecord
attr_accessible :admin
end
````
and call accessible_attributes, we can get a blank value together with 'admin'
```ruby
User.accessible_attributes = ["", "admin"]
````