handle pundit errors with http 403
This commit is contained in:
parent
bc7db85c8c
commit
cec6d3bfcd
1 changed files with 3 additions and 0 deletions
|
@ -53,5 +53,8 @@ module Metamaps
|
|||
g.test_framework :rspec
|
||||
end
|
||||
config.active_record.raise_in_transactional_callbacks = true
|
||||
|
||||
# pundit errors return 403 FORBIDDEN
|
||||
config.action_dispatch.rescue_responses["Pundit::NotAuthorizedError"] = :forbidden
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue