Commit 5ca75397 by Thanh Hung Pham

Add 404 page

parent c70037cd
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
......
<%- provide(:title, 'Errors') -%>
<div class="well">
<h2>404 - Not Found</h2>
</div>
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