mass-assign protected attributes in Rail 4

前端 未结 1 455
时光取名叫无心
时光取名叫无心 2021-01-15 10:24

I got the error message WARNING: Can\'t mass-assign protected attributes for There is a method \"Strong parameter can solve the problem\" but failed I don\'t want to do

1条回答
  •  悲哀的现实
    2021-01-15 10:42

    You have the gem

    protected_attributes (1.0.2) (Github)

    Which adds the old attr_accessible mass-assignment protection to your models.

    0 讨论(0)
提交回复
热议问题