내가 고안 사용하고 난에서 특정 페이지 if seller_disabled_paypal_permissions != nil
에 사용자를 리디렉션 필요 내 application_controller.rb
리디렉션 사용자 3
내 application_controller.rb에이 코드를
class ApplicationController < ActionController::Base
before_filter :bad_sellers
#more code
.
.
.
private
def bad_sellers
if user_signed_in?
redirect_to requirements_to_sell_user_path, :alert => t('.error') if current_user.seller_disabled_paypal_permissions != nil
return false
end
end
end
하지만 오류가 발생했습니다 :
오류 310 (net :: ERR_TOO_MANY_REDIRECTS) : 리디렉션이 너무 많습니다.
어떻게하면됩니까?
봐 볼 (
users_controllers
는application_controller
의 자식) 에서. – Swards