> However i don't think i implemented this correctly
You only need to add a slight modification to the create action so that 
the same review is connected to both the user and the restaurant:

@review = @restaurant.reviews.build(params[:review])
@review.user_id = current_user.id #hooks this review up to current_user
if (@review.save)
#(...)
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to