Created
October 11, 2008 20:43
-
-
Save technicalpickles/16321 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%p Whoops! The resource you were looking for wasn't found. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ApplicationController < ActionController::Base | |
def render_404 | |
render :template => "errors/404", :status => "404" | |
end | |
def rescue_action_in_public(exception) | |
case exception | |
when ActiveRecord::RecordNotFound | |
when ActiveRecord::RecordInvalid | |
when ActionController::RoutingError | |
when ActionController::UnknownController | |
when ActionController::UnknownAction | |
when ActionController::MethodNotAllowed | |
render_404 | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment