Add MediaAsset model.

A MediaAsset represents an image or video file uploaded to Danbooru. It
stores the metadata associated with the image or video. This is to work
on decoupling files from posts so that images can be uploaded separately
from posts.
This commit is contained in:
evazion
2021-03-14 20:08:54 -05:00
parent 2d976cf557
commit b068c113a8
11 changed files with 182 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
class MediaAssetsController < ApplicationController
respond_to :json, :xml
def index
@media_assets = authorize MediaAsset.visible(CurrentUser.user).paginated_search(params, count_pages: true)
respond_with(@media_assets)
end
end