Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
veNJOB
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thanh Hung Pham
veNJOB
Commits
5ca75397
Commit
5ca75397
authored
Jul 20, 2017
by
Thanh Hung Pham
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add 404 page
parent
c70037cd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
app/controllers/application_controller.rb
+5
-0
app/views/errors/error_404.html.erb
+4
-0
No files found.
app/controllers/application_controller.rb
View file @
5ca75397
class
ApplicationController
<
ActionController
::
Base
class
ApplicationController
<
ActionController
::
Base
before_action
:store_current_location
,
unless: :devise_controller?
before_action
:store_current_location
,
unless: :devise_controller?
protect_from_forgery
with: :exception
protect_from_forgery
with: :exception
rescue_from
ActiveRecord
::
RecordNotFound
,
with: :render_404
def
render_404
render
template:
'errors/error_404'
,
status:
404
end
private
private
...
...
app/views/errors/error_404.html.erb
0 → 100644
View file @
5ca75397
<%-
provide
(
:title
,
'Errors'
)
-%>
<div
class=
"well"
>
<h2>
404 - Not Found
</h2>
</div>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment