Sha256: ad1449aef59a97cd6b744dfd4cdd8c638061375504a6fb1898b9466f93a4086b

Contents?: true

Size: 733 Bytes

Versions: 5

Compression:

Stored size: 733 Bytes

Contents

if(RailsExceptionHandler.configuration.activate?)
  class ErrorResponseController < ApplicationController

    if Rails::VERSION::MAJOR > 3
      skip_before_action :verify_authenticity_token
    else
      skip_before_filter :verify_authenticity_token
    end


    def index
      if Rails::VERSION::MAJOR > 4
        render(:html => request.env['exception_handler.response'].html_safe, :layout => request.env['exception_handler.layout'])
      else
        render(:text => @_env['exception_handler.response'], :layout => @_env['exception_handler.layout'])
      end
    end

    def dummy_action
      if Rails::VERSION::MAJOR > 4
        render :body => nil
      else
        render :nothing => true
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_exception_handler-2.4.9 app/controllers/error_response_controller.rb
rails_exception_handler-2.4.8 app/controllers/error_response_controller.rb
rails_exception_handler-2.4.7 app/controllers/error_response_controller.rb
rails_exception_handler-2.4.6 app/controllers/error_response_controller.rb
rails_exception_handler-2.4.5 app/controllers/error_response_controller.rb