Created
April 22, 2009 22:53
-
-
Save bensie/100145 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
# Painless method for rendering a 404 (not found) whenever it might be useful | |
def render_404 | |
respond_to do |format| | |
format.html { render :file => "#{RAILS_ROOT}/public/404.html", :status => :not_found } | |
format.xml { head :not_found } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment