Sha256: e862ec1f319e61b31b9f16f8f40787d1043af523e6ab6985df7358ba188c321b

Contents?: true

Size: 630 Bytes

Versions: 14

Compression:

Stored size: 630 Bytes

Contents

module RailsBase
  class ErrorsController < ApplicationController
    before_action :set_variable

    def not_found
      @status = 404
      @message = "The Page can't be found"
      render template: 'rails_base/errors/not_found'
    end

    def unacceptable
      @status = 422
      @message = "Client Error. Please retry"
      render template: 'rails_base/errors/unacceptable'
    end

    def internal_error
      @status = 500
      @message = "An Internal Error has occured"
      render template: 'rails_base/errors/internal_error'
    end

    private

    def set_variable
      @error_page = true
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
rails_base-0.61.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.60.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.58.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.57.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.56.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.55.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.54.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.53.1 app/controllers/rails_base/errors_controller.rb
rails_base-0.53.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.52.3 app/controllers/rails_base/errors_controller.rb
rails_base-0.52.1 app/controllers/rails_base/errors_controller.rb
rails_base-0.52.0 app/controllers/rails_base/errors_controller.rb
rails_base-0.51.1 app/controllers/rails_base/errors_controller.rb
rails_base-0.51.0 app/controllers/rails_base/errors_controller.rb