Module: Cybele::Helpers::ErrorPages

Included in:
AppBuilder
Defined in:
lib/cybele/helpers/error_pages.rb

Instance Method Summary collapse

Instance Method Details

#configure_error_pagesObject



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/cybele/helpers/error_pages.rb', line 6

def configure_error_pages
  inject_into_file 'app/controllers/application_controller.rb',
                   template_content('error_pages/error_control.erb'),
                   after: 'class ApplicationController < ActionController::Base'

  inject_into_file 'app/controllers/application_controller.rb',
                   template_content('error_pages/error_method.erb'),
                   after: 'protect_from_forgery with: :exception, prepend: true'

  inject_into_file 'config/routes.rb',
                   template_content('error_pages/error_route.erb.rb'),
                   before: /^end/

  create_error_pages_files
end