Hi. I have tables for users and items. I’m trying to make a query that
will find all of the items belonging to the current user.
I have a testuser with id = 1 and this user has 4 items.
If I use the line:
@items = Item.find(:all, :conditions => “user_id = 1” )
The four items are displayed no problem.
No results are returned
I have tried printing out the value of session[:user][:id] on the
results page and it displays correctly as 1.
Can anyone tell me where I’m going wrong?