Ruby on Rails #49 gem Pundit for Authorization - Complete Guide

05/08/2021 (over 2 years ago)

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

Episode source code:
My text notes for this episode:
Gem pundit source code:

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

Sign in to join the conversation