how do I identify the @user.id using Restful Authentication?
-
09-09-2019 - |
Question
I just installed Restful Authentication.
After someone has successfully logged in, they write a review -- as you would a comment for a blog.
How do I know the value of the user_id column for the authenticater user so I can put that into the reviews table to match user to review?
Thanks.
Solution
I'm not 100% sure of this, but try @current_user.id in your controller
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow