Hi Dave I don't see the need to tie the 'feed_entry' to any other models except for the user. All that's being passed to the table are strings, and you only want to see the messages associated with a certain user's network (i.e. other users)... Or maybe you want to see messages associated with recipes.
It really just depends on what you want to do... it's all possible (that's the beauty of it!!!) cheers for the thoughts On Dec 25, 2:10 am, Dave Amos <rails-mailing-l...@andreas-s.net> wrote: > Nellboywrote: > > Personally, I'd probably take the approach of adding a 'feed_item' > > table to the database and tie it to the user with a 'has_many' > > relationship > > > then when user x updates their favourites, you can put something like > > "#{user.name} has added #{recipe.name} to their favourites" into the > > feed_item table with a user_id passed in as a parameter, and you can > > make these feed items appear on the homepage of whoever is following > > or is friends with this user... > > > no plugins required (i don't think anyway) > > > On Dec 24, 8:41 pm, "Ashley Williams" <a.j.r.willi...@googlemail.com> > > I don't think your method is very different from the one Ashley and I > were talking about. I created an "actions" table and tied it to the user > table. The thing is, I also tied it to my recipes, favorites, and > comments table. That way, whenever anyone adds a recipe, makes a recipe > a favorite, or adds a comment, an entry is added to the "actions" table. > That entry includes the id of the user so I know who did it. > > When I list my feed, the view code is (truncated example): > > <% @friendfeed.each do |friendfeed| %> > <%= link_to friendfeed.user.login, :controller => "users", :action => > "show", :id => friendfeed.user.id %> favorited <%= link_to > friendfeed.recipe.title, :controller => "recipes", :action => "show", > :id => friendfeed.recipe.id %> > <% end %> > -- > Posted viahttp://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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---