rails / protected_attributes

Protect attributes from mass-assignment in ActiveRecord models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Core initialize should not be transplanted

SamSaffron opened this issue · comments

commented

The way protected_attributes overrides initialize is very fragile, in particular it caused this

rails/rails#12243

We need to figure out a less monkey patchey way of doing this.

commented

@rafaelfranca we need to sort this out before we release the next service release of rails 4, this monkey patch is incompatible with current 4_0_stable

https://github.com/rails/protected_attributes/blob/master/lib/active_record/mass_assignment_security/core.rb

👍. I'll take a look

This was fixed adding a hook in the Rails codebase and overriding the hook here.

Thank you for investigate.

commented

thanks heaps for sorting this !