mikechabot / AnotherGlass

Pour another glass...
0 stars 0 forks source link

Liking a Wine #27

Closed will-clark closed 10 years ago

will-clark commented 10 years ago

On a wine profile page, there should be a button that allows me to like/unlike the wine.

If I like a wine, it should be viewable in a "liked wines" section of my profile page. Liking a wine should create a new timeline entry that is broadcast to my friends and the wine profile itself.

If I unlike a wine, it should be removed from the "liked wines" section of my profile page.

will-clark commented 10 years ago

Created Activity table to store Like, CheckIn activities Added a Like/Unlike button on the wine profile page If User likes a Wine an entry in the Activity table is created (type = like, user_id = ?, wine_id = ?, active = true). The LikeController /like/wine/:id action is called If User unlikes a Wine the entry in the Activity table is updated (type = like, user_id = ?, wine_id = ?, active = false) The LikeController /like/wine/:id action is called Added a Fans display to the wine profile page to show the 25 users who most recently liked the wine Added a "I like these wines" listing to the User profile page Updated Shiro config such that Users must be logged in to Like