Why redirect_to in around_filter or after_filter won't work?

后端 未结 3 614
天命终不由人
天命终不由人 2021-01-26 18:53

How to make redirect_to works in those filters?

I\'m trying to change

def start 
  ....
  redirect_to index
end

def end
  ...
  redirect_to index
end           


        
3条回答
  •  时光说笑
    2021-01-26 19:54

    Presumably, your actions already have a redirect_to or render call. You cannot call these methods twice per request.

提交回复
热议问题