🚨 Pay Just $95/Year (Save 50%)—Black Friday Deal!

#49 gem Pundit for Authorization - Complete Guide

05/08/2021

Restrict access to different views and actions in your application based on users roles.

Episode source code:
https://github.com/corsego/49-gem-pundit/commit/3e3c65d8b6deaf382dea5ce554c732e85731d6d2
My text notes for this episode:
https://blog.corsego.com/complete-guide-to-gem-pundit
Gem pundit source code:
https://github.com/varvet/pundit

0:00 Authorization without a gem
2:20 Install gem Pundit, basic usage
7:10 User Policy - only admin can edit
10:22 Create Post Policy
11:50 Pundit Scopes
14:10 Authorization conditions in views
16:34 Summary

0
Inicia sesión para unirte a la conversación