Class: ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Includes:
Pagy::Backend
Defined in:
app/controllers/application_controller.rb

Overview

This controller contain the methods shared for all controller

Instance Method Summary collapse

Instance Method Details

#access_denied!nil (private)

Render 401 page and stop the work

Returns:

  • (nil)

21
22
23
# File 'app/controllers/application_controller.rb', line 21

def access_denied!
  render 'errors/401', status: :unauthorized and return
end

#record_not_found!nil (private)

Render 404 page and stop the work

Returns:

  • (nil)

15
16
17
# File 'app/controllers/application_controller.rb', line 15

def record_not_found!
  render partial: 'errors/404', status: 404 and return
end