Created
June 10, 2016 09:16
-
-
Save JulienSansot/cbb983bb952768bfba0c8147612e66a1 to your computer and use it in GitHub Desktop.
This file contains 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
rescue_from DashboardErrors::Unauthorized do | |
respond_to do |format| | |
format.html { render } # 403 | |
format.html { redirect_to @role } | |
format.json { render json: { error: "Unauthorized" }, status: :method_not_allowed } # 403 | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment