Sha256: f01cc6147ad7816ab4b2225b25ac2e203f90aec19b7d19bfc529c9439ca477fa
Contents?: true
Size: 411 Bytes
Versions: 8
Compression:
Stored size: 411 Bytes
Contents
# coding: utf-8 class Formily::FileController < FormilyController before_action :authenticate_user! if (true if Devise rescue false) def show f = Formily::File.find(params[:id]) send_file Rails.root.join(f.file.path), type: f.file_content_type, disposition: 'inline' end def destroy file = Formily::File.find(params[:id]) file.destroy render nothing: true, status: :ok end end
Version data entries
8 entries across 8 versions & 1 rubygems