1
0
Fork 0
forked from gitea/nas

Fix media attaches panel title

This commit is contained in:
KMY 2023-02-28 15:33:20 +09:00
parent 1e67d25856
commit 87b9fd9624
2 changed files with 2 additions and 2 deletions

View file

@ -12,7 +12,7 @@ module Admin
private private
def filtered_attachments def filtered_attachments
MediaAttachment.recently_attachments MediaAttachment.local_attached.order(created_at: :desc)
end end
end end
end end

View file

@ -209,7 +209,7 @@ class MediaAttachment < ApplicationRecord
scope :local, -> { where(remote_url: '') } scope :local, -> { where(remote_url: '') }
scope :remote, -> { where.not(remote_url: '') } scope :remote, -> { where.not(remote_url: '') }
scope :cached, -> { remote.where.not(file_file_name: nil) } scope :cached, -> { remote.where.not(file_file_name: nil) }
scope :recently_attachments, -> { attached.where(remote_url: '').order(status_id: 'DESC') } scope :local_attached, -> { attached.where(remote_url: '') }
default_scope { order(id: :asc) } default_scope { order(id: :asc) }