This commit is contained in:
2025-06-30 23:31:39 +09:00
parent 068d0aed14
commit e20f7fcc17
13 changed files with 140 additions and 75 deletions
+8
View File
@@ -19,4 +19,12 @@ class User < ApplicationRecord
def viewed? post
user_post_views.exists? post_id: post.id
end
def member?
['member', 'admin'].include?(role)
end
def admin?
role == 'admin'
end
end