Very useful to see errors in dev and test envs
This commit is contained in:
parent
d3ef80de62
commit
ae6ea7c288
|
@ -1,11 +1,13 @@
|
|||
class ApplicationController < ActionController::Base
|
||||
protect_from_forgery
|
||||
|
||||
rescue_from Exception, :with => :render_error
|
||||
|
||||
protected
|
||||
|
||||
unless Rails.env.development? || Rails.env.test?
|
||||
rescue_from Exception, :with => :render_error
|
||||
|
||||
def render_error
|
||||
render :template => "/admin/errors/500", :layout => 'admin/box', :status => 500
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue