parent
183a23943b
commit
bd5ad304ba
@ -0,0 +1,13 @@ |
||||
class MediaController < ApplicationController |
||||
before_action :set_media_attachment |
||||
|
||||
def show |
||||
redirect TagManager.instance.url_for(@media_attachment.status) |
||||
end |
||||
|
||||
private |
||||
|
||||
def set_media_attachment |
||||
@media_attachment = MediaAttachment.where.not(status_id: nil).find(params[:id]) |
||||
end |
||||
end |
@ -1,4 +1,5 @@ |
||||
object @media |
||||
attribute :id |
||||
attribute :id, :type |
||||
node(:url) { |media| full_asset_url(media.file.url) } |
||||
node(:preview_url) { |media| full_asset_url(media.file.url(:small)) } |
||||
node(:text_url) { |media| medium_url(media) } |
||||
|
Loading…
Reference in new issue