난 항상 다음과 같은 오류 얻을 : 그것은 ID가 nil을 두 번째로 첫 번째가 아닌 경우,인 AbstractController :: DoubleRenderError 3
이AbstractController::DoubleRenderError (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".):
오류가 발생을 ...
def calc_next
id = next()
if id.nil?
id = next_next()
if id.nil?
render :layout => false, :format => :js
else
redirect_to :action => "view", :id => id, :format => :js
end
else
redirect_to :action => "view", :id => id, :format => :js
end
end
외부 리디렉션이 문제가되지 않기 때문에이 리디렉션에서 문제가 발생하지 않습니다. 심지어 디버거이 같은 시간에 리디렉션 ...
어떤 도움에 감사드립니다 ... 마르쿠스
쿨, 감사를 반환, 당신이 나에게 정확한 권리 힌트는 next_next() 함수는 리디렉션을했다 준 반환을 이미 통합 된 행동 ... – Markus