Bit hacky but you could override 

> remove_attributes_protected_from_mass_assignment or overwrite the 
> attribute containing the list of protected attributes 
>

Thank you!
I did not find the remove_attributes_protected..., but did find an 
interesting method sanitize here: 
rails<https://github.com/rails/rails/tree/59f7780a3454a14054d1d33d9b6e31192ab2e58b>/
 
activemodel<https://github.com/rails/rails/tree/59f7780a3454a14054d1d33d9b6e31192ab2e58b/activemodel>/
 
lib<https://github.com/rails/rails/tree/59f7780a3454a14054d1d33d9b6e31192ab2e58b/activemodel/lib>/
 
active_model<https://github.com/rails/rails/tree/59f7780a3454a14054d1d33d9b6e31192ab2e58b/activemodel/lib/active_model>/
 
mass_assignment_security<https://github.com/rails/rails/tree/59f7780a3454a14054d1d33d9b6e31192ab2e58b/activemodel/lib/active_model/mass_assignment_security>/
 sanitizer.rb 

My solution for the archives: seeds.rb
module ActiveModel
  module MassAssignmentSecurity
    module Sanitizer
      def sanitize(attributes)
        attributes
      end
    end
  end
end


-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to