Class: Formily::FileController
- Inherits:
-
FormilyController
- Object
- ActionController::Base
- FormilyController
- Formily::FileController
- Defined in:
- app/controllers/formily/file_controller.rb
Instance Method Summary collapse
Instance Method Details
#destroy ⇒ Object
11 12 13 14 15 |
# File 'app/controllers/formily/file_controller.rb', line 11 def destroy file = Formily::File.find(params[:id]) file.destroy render nothing: true, status: :ok end |
#show ⇒ Object
6 7 8 9 |
# File 'app/controllers/formily/file_controller.rb', line 6 def show f = Formily::File.find(params[:id]) send_file Rails.root.join(f.file.path), type: f.file_content_type, disposition: 'inline' end |