From c9a2a5e27a7614b26de4f7c243951ccb6741d862 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Thu, 24 Aug 2023 21:11:22 -0700 Subject: [PATCH] Add admin check in User model --- app/models/user.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/models/user.rb b/app/models/user.rb index 215885e..48c4f5f 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -43,6 +43,10 @@ class User < ApplicationRecord favorites.map(&:party) end + def admin? + role == 9 + end + def blueprint UserBlueprint end