From 60a249f4e6fffce78704704f959943d56a30fd54 Mon Sep 17 00:00:00 2001 From: Thomas Klemm Date: Mon, 24 Jun 2013 23:54:48 +0300 Subject: [PATCH] Fix missing code block ending ... and reword a heading --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7fdeff9..8102ed5 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,7 @@ class ApplicationPolicy end ``` -## Rescuing `Pundit::NotAuthorizedError` in Rails +## Rescuing a denied Authorization in rails Pundit raises a `Pundit::NotAuthorizedError` you can [rescue_from](http://guides.rubyonrails.org/action_controller_overview.html#rescue_from) in your `ApplicationController`. You can customize the `user_not_authorized` method in every controller. @@ -283,6 +283,7 @@ class ApplicationController < ActionController::Base redirect_to request.headers["Referer"] || root_path end end +``` ## Manually retrieving policies and scopes