Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ruby/23.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ruby on rails 带撬杆过滤器前的调试_Ruby On Rails_Ruby_Pry - Fatal编程技术网

Ruby on rails 带撬杆过滤器前的调试

Ruby on rails 带撬杆过滤器前的调试,ruby-on-rails,ruby,pry,Ruby On Rails,Ruby,Pry,我的控制器中有一个before_过滤器: before_filter :authenticate_user!, :except => [:show,:index] def create #method code end 我的问题是:如何调试before\u filter方法来验证用户!用于使用pry创建方法 谢谢 我最后禁用了before\u过滤器,只添加了authenticate\u用户!方法添加到我的create方法的第一行-它几乎成功了。我最终禁用了befor

我的控制器中有一个before_过滤器:

  before_filter :authenticate_user!, :except => [:show,:index]

  def create
    #method code
  end
我的问题是:如何调试before\u filter方法来验证用户!用于使用pry创建方法


谢谢

我最后禁用了before\u过滤器,只添加了authenticate\u用户!方法添加到我的create方法的第一行-它几乎成功了。

我最终禁用了before\u过滤器,只添加了authenticate\u用户!方法添加到我的create方法的第一行-它基本上做到了这一点

before_filter :bla

def bla
  binding.pry
  authenticate_user!
end