Skip to content

Instantly share code, notes, and snippets.

@anoobbava
Last active March 22, 2018 14:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anoobbava/9ed5b57e3d8bb75c77715a7057cd86b7 to your computer and use it in GitHub Desktop.
Save anoobbava/9ed5b57e3d8bb75c77715a7057cd86b7 to your computer and use it in GitHub Desktop.
custom rails pages blog
# encoding: utf-8
class ErrorsController < ApplicationController
skip_before_action :authenticate_user!
def not_found
respond_to do |format|
format.html { render status: 404 }
end
end
def unacceptable
respond_to do |format|
format.html { render status: 422 }
end
end
def internal_error
respond_to do |format|
format.html { render status: 500 }
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment