Using Devise, we'll create user roles for normal users and admin users by creating an enum. We'll then use this to create a dashboard where we avoid N+1 queries by using the .includes method. We also fix the Ransack gem searching issue after we move the post body from a regular text to an Action Text body. This allows us to search the Action Text body.
Join this channel to help support these videos:
/ @deanin
Source code: https://github.com/Deanout/blog_appli...
Playlist: • Intro Ruby on Rails 7 For Beginners T...
Follow me on social media:
https://linktr.ee/deanin
Join this channel to get access to perks:
/ @deanin
If you liked this video, please consider subscribing: https://t.co/RZ4EwP0F2a
Timestamps
0:00 Creating An Admin Dashboard In Rails 7
1:13 Creating Devise Admin User Roles
5:21 Making Ransack Work With Action Text In Rails 7
10:55 Creating Admin Only Routes In Rails 7
13:44 Creating The Admin Controllers And Fixing N+1 Queries
15:10 Creating The Admin Dashboard Page
27:23 Fixing Notifications When Deleting Posts In Rails 7
28:00 Finishing The Admin Post Show Page
#Deanin #Software #Programming