search for: non_top

Displaying 1 result from an estimated 1 matches for "non_top".

Did you mean: nonstop
2006 May 07
1
Find records not in join with has_many_and_belongs_to
I have a User and Topic model. A user subscribes to a topic, so there is a many-to-many relationship between User and Topic. So my User model object is using has_many_and_belongs_to :topics and vice versa. I want to find all the topics that a user has *not* subscribed to. This is what I''ve got: @user = User.find(params[:id]) @topics = Topic.find(:all, :conditions =>