Skip to content

Instantly share code, notes, and snippets.

@trek
Created October 1, 2008 15:25
Show Gist options
  • Select an option

  • Save trek/14099 to your computer and use it in GitHub Desktop.

Select an option

Save trek/14099 to your computer and use it in GitHub Desktop.
def show
@note = Note.find(:where => 'id = 1')
rescue NotFound
redirect_to 'not_found', :status => 404
rescue NoDatabase
logger.error('the db died again, shit')
redirect_to 'apology', :status => 500
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment