Chapter 14. Friendships
With the double-blind email system in place, we suppose that RailsSpace is now technically a social network, but most real-world social networks worthy of the name give users a way to select preferred members. Following tradition, we call such distinguished users friends. Adding friends to RailsSpace is the goal of this chapter.
Friendships represent the most challenging data modeling problem we’ve encountered so far. To solve it, we’ll have to learn about simulated table names, foreign keys, and the has_many
database association. Adding and managing friendships will then take place through both email and web interfaces. By the end of the chapter, we’ll be in a position to put a list of friends on the hub and user profile, ...
Get RailsSpace: Building a Social Networking Website with Ruby on Rails™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.