"Like" model, controller design

user007 Posted by user007 on November 14, 2011

I have three models, User, Product, Like. That is, a user can (un)like a product...

I wonder what would be best practice to design controller and models. 1. Creating likes_controller and process create/destroy actions 2. Creating like/unlike actions inside products_controller 3. or else.

Second question; into which model should I put methods relating to likes such as "has_likes?" or "liked?"

Answers

Fork me on GitHub