Ashley Williams wrote: > You could also create an Actions model which has_many > favourites/comments/ect. which seems like a more sensible solution; it'd > join and include all the data from the sources tables for you in one > query. > :) > > On Wed, Dec 24, 2008 at 4:19 PM, Dave Amos > <[email protected]
Clever! I'm not sure I'm clever enough to implement it correctly, though. I created a Newsfeed model and did the has_many/belong_to stuff, but I'm not sure how to do my controller code. Lets say I wanted to have a feed of all actions a user takes (comments, recipes posted, favorites, etc.). I tried: @feed = Newsfeed.find(:all, :conditions => ["user_id = ?", @user.id]) But I get this error: Mysql::Error: #42S02Table 'cookingfriend_development.newsfeeds' doesn't exist: SELECT * FROM `newsfeeds` I think I need a database? How else do I query the model? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

