Module: Sufia::UploadsControllerBehavior
- Extended by:
- ActiveSupport::Concern
- Included in:
- UploadsController
- Defined in:
- app/controllers/concerns/sufia/uploads_controller_behavior.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
8 9 10 11 12 |
# File 'app/controllers/concerns/sufia/uploads_controller_behavior.rb', line 8 def create @upload.attributes = { file: params[:files].first, user: current_user } @upload.save! end |
#destroy ⇒ Object
14 15 16 17 |
# File 'app/controllers/concerns/sufia/uploads_controller_behavior.rb', line 14 def destroy @upload.destroy head :no_content end |