Selecting favourites from DB rails 3
Posted
by
Richlewis
on Stack Overflow
See other posts from Stack Overflow
or by Richlewis
Published on 2012-11-05T10:58:51Z
Indexed on
2012/11/05
11:00 UTC
Read the original article
Hit count: 129
ruby-on-rails-3
I have a small app which has Users, Recipes, Ingredients and preparation models
A user has many recipes, recipes belong to user and ingredients/preparation belongs to recipes.
Now a user can view all recipes but I would like the option to add the particular recipe to a favourites list. Would I need to set a new DB to hold this and then link by associations or could I add a column to the recipe model called fav for example?
Im looking for the best practice here or if someone has done this before and can offer any advice that would be appreciated
© Stack Overflow or respective owner