rails / protected_attributes

Protect attributes from mass-assignment in ActiveRecord models.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Don't understand how this gem can work with rails 4 (cross-post)

h0jeZvgoxFepBQ2C opened this issue · comments

Hi,

I'm having following problems: attr-encrypted/attr_encrypted#246

And i really don't understand how the "protected_attributes" gem can work, because it uses following method (with 2! parameters):

assign_attributes(attributes, options)

But in ActiveRecord 4 there is no method like this - because the only assign_attributes method has following signature (1! parameter):

# activerecord-4.2.7.1/lib/active_record/attribute_assignment.rb
   ...
    def assign_attributes(new_attributes)

Can someone give me a hint how this can work? And why I get this error, even if the gems themselfes should work fine with rails 4.2? Thanks :(

I removed this gem, my problem was solved.. but i couldnt found the reason.