has_many :oops

January 9th, 2007
by Mark Carey

A couple of days ago I posted about my has_many :through troubles. Going back and re-reading the section in the new AWDwR 2nd ed. I realized why it is important to be well rested when trying to solve a problem.

When I had read through that section the first time, I did not see what I just read, namely the simple straight forward solution to the problem I was having with creating a join record using a join model. Specifically the bottom half of page 339 demonstrates the solution to the problem I was having.

I mistakenly reported that the book did not discuss the problem at all and I just wanted to clear that up and say it actually did.

Still it is worth noting that a simple google search turns up a lot of instances of people struggling with how to use has_many :through, since it works differently that any of the other association declarations.

Tags: , , , ,
Posted in Uncategorized | Comments (0)