create error page

parent 3154a8eb
Pipeline #1022 failed with stages
in 0 seconds
.error-banner-ground{
position: relative;
width: 100%;
height: 100vh;
}
.error-500-banner {
background-image: url('500errorpage.jpg');
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-size: cover;
}
.error-404-banner {
background-image: url('404errorpage.jpg');
width: 100%;
height: 100%;
background-repeat: no-repeat;
background-size: cover;
}
class ErrorsController < ApplicationController
def error_404
end
def error_500
end
end
<div class="container">
<div class="error-banner-ground">
<div class="error-404-banner">
</div>
</div>
</div>
<div class="container">
<div class="error-banner-ground">
<div class="error-500-banner">
</div>
</div>
</div>
......@@ -10,6 +10,7 @@ module Venjob
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.2
config.exceptions_app = self.routes
config.before_configuration do
env_file = File.join(Rails.root, 'config', 'local_env.yml')
YAML.load(File.open(env_file)).each do |key, value|
......
......@@ -10,7 +10,7 @@ Rails.application.configure do
config.eager_load = false
# Show full error reports.
config.consider_all_requests_local = true
config.consider_all_requests_local = false
# Enable/disable caching. By default caching is disabled.
# Run rails dev:cache to toggle caching.
......
......@@ -27,12 +27,18 @@ Rails.application.routes.draw do
get 'jobs/industry/:converted_name', to: 'jobs#industry_jobs', as: :industry_jobs
get 'jobs/company/:converted_name', to: 'jobs#company_jobs', as: :company_jobs
resources :reset_passwords, only: [:edit, :update]
resources :confirmations, only: [:new]
resources :top_pages, only: [:index]
resources :industries, only: [:index]
resources :cities, only: [:index]
root to: "top_pages#index"
match '/404', via: :all, to: 'errors#error_404'
match '/500', via: :all, to: 'errors#error_500'
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment