After loading the Rails console, how do I log in to my account?
Devise provides a test helper that can be used in tests, and I tried to use it in the console:
>> include Devise::TestHelpers >> helper.sign_in(User.first)
But I get:
NoMethodError: undefined method `env' for nil:NilClass
In any case, I would like to use a real assistant assistant, not this test assistant. Is there any way to achieve this?
ruby-on-rails console devise
Christian Feb 08 2018-11-11T00: 00Z
source share