Can't mass-assign protected attributes

后端 未结 4 494
一整个雨季
一整个雨季 2021-02-05 02:53

Updating the code formatting for better viewing.

Folks,

I have been looking at this for sometime but I don\'t understand what could be messing up here. I am usin

4条回答
  •  青春惊慌失措
    2021-02-05 03:20

    Inside of SpecificModel (appfolder/app/model/specific_model.rb)

    Try using

    attr_accessible :addresses_attributes, :another_attribute_to_make_mass_assignable, :another_attribute, etc.

提交回复
热议问题