Sha256: bce9f44b09e47dc0d54ce01c28a11f596365e063b2989b003e32fdce8f6c9ff3

Contents?: true

Size: 438 Bytes

Versions: 8

Compression:

Stored size: 438 Bytes

Contents

module Releaf::ActionController::Exceptions
  extend ActiveSupport::Concern

  included do
    rescue_from Releaf::AccessDenied, with: :access_denied
    rescue_from Releaf::RecordNotFound, with: :page_not_found
  end

  def page_not_found
    render "releaf/error_pages/page_not_found", status: :not_found, formats: :html
  end

  def access_denied
    render "releaf/error_pages/forbidden", status: :forbidden, formats: :html
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
releaf-core-3.1.0 app/lib/releaf/action_controller/exceptions.rb
releaf-core-3.0.3 app/lib/releaf/action_controller/exceptions.rb
releaf-core-3.0.2 app/lib/releaf/action_controller/exceptions.rb
releaf-core-3.0.1 app/lib/releaf/action_controller/exceptions.rb
releaf-core-3.0.0 app/lib/releaf/action_controller/exceptions.rb
releaf-core-2.2.1 app/lib/releaf/action_controller/exceptions.rb
releaf-core-2.2.0 app/lib/releaf/action_controller/exceptions.rb
releaf-core-2.1.2 app/lib/releaf/action_controller/exceptions.rb