0
我想打电话给current_user
在轨控制台,以确保在用户登录使用CURRENT_USER和其他设计助手当我写它虽然,我得到以下错误:在轨控制台
1.9.3p393 :045 > current_user
NameError: undefined local variable or method `current_user' for main:Object
如何我是否包含可让我使用此方法的适当模块?
current_user从会话中获取信息。从控制台无法访问会话。 – usha
好吧,我将不得不围绕这个问题进行调试,然后 –
你看过[pry-rails](https://github.com/rweng/pry-rails)和['binding.pry'](https:/ /github.com/pry/pry#runtime-invocation)? – rubish