Skip to content

Instantly share code, notes, and snippets.

@etaque
Created December 12, 2009 14:12
Show Gist options
  • Save etaque/254897 to your computer and use it in GitHub Desktop.
Save etaque/254897 to your computer and use it in GitHub Desktop.
rescue_from ActionController::RoutingError,
ActionController::UnknownAction,
ActiveRecord::RecordNotFound,
ActionView::MissingTemplate,
ActionController::MethodNotAllowed,
WillPaginate::InvalidPage, :with => :route_not_found
protected
# 404
def route_not_found
render :template => 'welcome/404', :status => :not_found
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment