Do not return unapproved screenshots
This commit is contained in:
parent
00ce29d6a5
commit
7fe26d471e
3 changed files with 5 additions and 3 deletions
|
|
@ -7,6 +7,8 @@ class Screenshot < ApplicationRecord
|
|||
# - otherwise show newest first
|
||||
default_scope { order(approved: :asc, hidden: :asc, created_at: :desc) }
|
||||
|
||||
scope :approved, -> { where(approved: true) }
|
||||
|
||||
# Shrine
|
||||
include ImageUploader::Attachment(:simage) # adds an `simage` virtual attribute
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue