Files
danbooru/app/models/upload_media_asset.rb
evazion 44ca178d7a uploads: add upload_media_assets.page_url.
This is needed for multi-file uploads. We need to know both the image
url and the page url to set the post's source correctly when converting
an upload media asset into a post.
2022-02-11 02:51:20 -06:00

19 lines
430 B
Ruby

# frozen_string_literal: true
class UploadMediaAsset < ApplicationRecord
belongs_to :upload
belongs_to :media_asset, optional: true
enum status: {
pending: 0,
processing: 100,
active: 200,
failed: 300,
}
def self.search(params)
q = search_attributes(params, :id, :created_at, :updated_at, :status, :source_url, :page_url, :error, :upload, :media_asset)
q.apply_default_order(params)
end
end