Rescue encoding error on controller level
This commit is contained in:
parent
a719bfc931
commit
17d4cac208
2 changed files with 10 additions and 0 deletions
|
@ -9,6 +9,10 @@ class ApplicationController < ActionController::Base
|
|||
render "errors/gitolite", :layout => "error"
|
||||
end
|
||||
|
||||
rescue_from Encoding::CompatibilityError do |exception|
|
||||
render "errors/encoding", :layout => "error", :status => 404
|
||||
end
|
||||
|
||||
rescue_from ActiveRecord::RecordNotFound do |exception|
|
||||
render "errors/not_found", :layout => "error", :status => 404
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue