闭社主体 forked from https://github.com/tootsuite/mastodon
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
336 B

  1. # frozen_string_literal: true
  2. class MediaController < ApplicationController
  3. before_action :set_media_attachment
  4. def show
  5. redirect_to TagManager.instance.url_for(@media_attachment.status)
  6. end
  7. private
  8. def set_media_attachment
  9. @media_attachment = MediaAttachment.where.not(status_id: nil).find(params[:id])
  10. end
  11. end