Home > Development > No association found for name `products'. Has it been defined yet?

No association found for name `products'. Has it been defined yet?

Working on a project, I had to make some changes to the associations – where Product_Lines had many Products to Product_Lines has one Product.  (The reason behind this is a whole other story.)

This is the error I got:

No association found for name `products’. Has it been defined yet?

I had changed the Product_Lines model to has_one Product.  But, I had over looked the accepts_nested_attributes_for line.  I changed :products to :product and it fixed it.

Andrew Development ,

  1. June 2nd, 2010 at 03:20 | #1

    Wow this is a great resource.. I’m enjoying it.. good article

  2. June 16th, 2010 at 14:49 | #2

    It’s interesting to find how challenging the content side is for some

  1. No trackbacks yet.