I’m getting an ActiveRecord error after submitting a form for a table called worequests. The error is “unknown attribute: contact_id”. But, the worequests table contains contact_id. It is a foreign key to the contacts table. In my worequest model, I have “belongs_to :contact” and in my contact model, I have “has_many :worequests”.
I’m getting an ActiveRecord error after submitting a form for a table called worequests.
Share
I fixed the problem. When I create a worequest, I also have code to create a record in a comment table. The code is in the worequest model. In that line of code I had a field typed wrong.