Я пробую стандартный синтаксис redirect_to some_path and return
, но по какой-то причине Rails 3 это не нравится.
class MyController < ApplicationController
def some_action
redirect_to "http://www.google.com"
return
end
end
Дает мне стандартное сообщение об ошибке:
Render and/or redirect were called multiple times in this action. Please note that you may only call render OR redirect, and at most once per action. Also note that neither redirect nor render terminate execution of the action, so if you want to exit an action after redirecting, you need to do something like "redirect_to(...) and return".
Он ссылается на точную строку моего redirect_to "http://www.google.com"
в ошибке. Не могу понять, как это возможно!
Я прокомментировал все до того, как смогу найти фильтры, без разницы.
Это Rails 3.0.0