In my app, a user
has many score_cards
and a score_card
belongs to a user
The question is, whenever I create a new score_card
, ie, ScoreCardsController.create
gets called, how do I add this newly created score_card
to the current_user
(I'm using devise, so current_user
is a valid User
object).
current_user.score_cards << score_card
OR
score_card.user = current_user
score_card.save