I have a scenario where I created a few has_many :through associations which I am having trouble updating. I do appreciate any help! Thank you!
Here is my setup:
ruby 1.9.3p392 Rails 3.2.13
Here is the scenario:
I have 3 models that are related There are many Industries, many Keywords, and many Conferences Industries have many Keywords Conferences have an Industry Conferences choose Keywords based on its Industry
Keywords has a basic CRUD model. Creating an Industry then adding Keywords works fine.
My relationship for Conferences, Industries, and Keywords is where I am having issues. I am trying to update Conference information, change the Industry that it is currently associated with, choose new Keywords based on the new Industry all in the same form. When I remove the Keywords element out of the mix, the update works. But when all three are there, then I get the errors.
The view renders fine but when I submit a change, I get an error. The error that I am seeing is:
**Couldn't find Industry with ID=3 for Conference with ID=1**
My relationship for Industries and Keywords are: