diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-17 17:47:26 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-17 17:47:26 +0200 |
commit | bd5ad304bac69b34a3c223e9baac532106db7dd8 (patch) | |
tree | 46d98c91108401e19a5065103b7c1f48db91def8 /app/controllers | |
parent | 183a23943bba2c214c56bf43c706f3f34d9bde32 (diff) |
Adding media controller, 1 webm/compose form allowed, previews generated
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/media_controller.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/app/controllers/media_controller.rb b/app/controllers/media_controller.rb new file mode 100644 index 000000000..5a7b0bcbd --- /dev/null +++ b/app/controllers/media_controller.rb @@ -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 |