app/controllers/application_controller.rb
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception.
For APIs, you may want to use :null_session instead.
Prevent CSRF attacks by raising an exception . For APIs you may want to use : null_session instead .
def render_403(exception)
    if request.format != :js
      @error_short = exception.message
      @error_message = "\n\nEXCEPTION\n"+exception.message+"\n"+exception.backtrace.join("\n")+"\nEND exception\n\n"
      logger.warn( @error_message )
      respond_to do |format|
        format.html { render template: 'errors/global_exception', layout: "layouts/webserver", status: 500 }
        format.all { render nothing: true, status: 500 }
      end
    end
  end
def render_403 ( exception ) if request . format != :js @error_short = exception . message @error_message = "\n\nEXCEPTION\n" + exception . message + "\n" + exception . backtrace . join ( "\n" ) + "\nEND exception\n\n" logger . warn ( @error_message ) respond_to do | format | format . html { render template : 'errors/global_exception' , layout : "layouts/webserver" , status : 500 } format . all { render nothing : true , status : 500 } end end end
Prevent CSRF attacks by raising an exception.
Prevent CSRF attacks by raising an exception .
exception
<not_specific>