Showing number of users' uploaded screenshots at the top
This commit is contained in:
parent
82fb26efad
commit
bbccbfcc20
3 changed files with 23 additions and 0 deletions
|
|
@ -108,4 +108,9 @@ class Screenshot < ApplicationRecord
|
|||
def self.approved
|
||||
self.find_by(approved: true)
|
||||
end
|
||||
|
||||
# Query for screenshots being uploaded by a certain user (by their token)
|
||||
def self.uploaded_by(token)
|
||||
self.where(approved: false, uploaderhash: token)
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue