Using current_user and other Devise Helpers in the rails console -


i want call current_user in rails console ensure user logged in. when write though, following error:

1.9.3p393 :045 > current_user nameerror: undefined local variable or method `current_user' main:object 

how include appropriate module let me use method?

best thing use pry gem. once install it, add line pry controller , can access current_user. cannot access current_user console in other way since session based.


Comments

Popular posts from this blog

java - How to Configure JAXRS and Spring With Annotations -

visual studio - TFS will not accept changes I've made to a Java project -

php - Create image in codeigniter on the fly -