Content Management in rails

Abhi Manyu wrote:

Hi check whether Line_items is the class name

I have defined all the associations. In line_item model i have defined belongs_to :order and in order model I have defined belongs_to :user. The error is:

NameError in UserController#search

Like I said before, if you are adhering to the conventions, the class
name is LineItem, not line_item or Line_item or Line_items

Fred

Yes. create the association.

Fred

Frederick Cheung wrote:

solution for that?

Yes. create the association.

Fred

But how? I dont have a user_id in lineitems table.

Read up on has_many :through

Fred