Neil Cauldwell
2008-Mar-09 12:11 UTC
Opinions on ''Fan'' relationship model in RESTful app
I''m working on an app in which users can become a ''fan'' of another user. I''m trying to determine if and how this is similar to a ''friendship'' model, like the one seen in the has_many_friends plugin, but I haven''t got my head round the differences yet, so I''m looking for advice. I''m coming to the conclusion that ''fans'' are different to ''friends'' because a user can have a fan without themselves being a fan of the fan, whereas a friendship model requires both users to be friends with one another when the friendship is created. Use case; A User1 clicks a button on User2''s profile page to become a ''fan'' of User2. User2 will, depending on their email notification settings (yes/no), be notified that they have a new fan. That''s pretty much it, but I''m also considering an option which enables users to first approve of other users becoming a fan. This would be specified in a profile setting. I presume this function will necessitate adding a ''status'' to the fan table and adding ''requested'' statuses etc. How would you set up this up in a RESTful app? -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---