AssociationTypeMismatch (Object expected, got HashWithIndifferentAccess) in Rails app

后端 未结 2 2049
囚心锁ツ
囚心锁ツ 2021-02-10 23:18

I\'m getting a AssociationTypeMismatch Error and I\'m not sure where I\'m making a mistake. I\'m pretty new to Rails so I\'m guessing I\'m making some silly mistake. I\'ve check

2条回答
  •  感情败类
    2021-02-11 00:08

    it is:

    attr_accessible :preference_attributes
    

    and in your form:

    <%= f.fields_for :preference_attributes do |builder| %>
    ...
    

提交回复
热议问题