mirror of
https://github.com/ENSL/ensl.org.git
synced 2024-12-28 13:31:06 +00:00
Catch RecordNotFound exception
This commit is contained in:
parent
c2ab6bac8d
commit
e1b27ba247
3 changed files with 7 additions and 0 deletions
1
app/assets/javascripts/app.js
Normal file
1
app/assets/javascripts/app.js
Normal file
|
@ -0,0 +1 @@
|
||||||
|
window.ENSL = Ember.Application.Create();
|
|
@ -50,6 +50,10 @@ class ApplicationController < ActionController::Base
|
||||||
render text: t(:application_stale)
|
render text: t(:application_stale)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
rescue_from ActiveRecord::RecordNotFound do |exception|
|
||||||
|
render :template => 'errors/404.html', :status => :not_found, :layout => 'errors'
|
||||||
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def update_user
|
def update_user
|
||||||
|
|
2
public/404.html
Normal file
2
public/404.html
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
<h1>The page you were looking for doesn't exist.</h1>
|
||||||
|
<p>You may have mistyped the address or the page may have moved.</p>
|
Loading…
Reference in a new issue