Adding media controller, 1 webm/compose form allowed, previews generated
This commit is contained in:
13
app/controllers/media_controller.rb
Normal file
13
app/controllers/media_controller.rb
Normal file
@ -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
|
Reference in New Issue
Block a user