Joseph Wilks
2014-Oct-07 01:14 UTC
Accessing and updating Devise current user in a different controller
So I'm creating a tv trivia game app, and when a user completes their quiz, I need to update certain aspects of the user (level/xp, also saving some of their answers to the database). However, I'm using devise for authentication, and I'm not sure how to access and update the current user when I'm in the quiz controller or quiz view. I'm assuming I need to add a helper method which gives the controller access to the current user, but I'm not sure how to do it exactly. Thanks in advance for your help. -- 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 unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/409dc897c54b41e8c9f8e0f4610f909d%40ruby-forum.com. For more options, visit https://groups.google.com/d/optout.