Sha256: 1fa0d7d17dce4f1b42ab3b43c0852c31cac9a52cc476518a4d58af44f016ae63
Contents?: true
Size: 359 Bytes
Versions: 13
Compression:
Stored size: 359 Bytes
Contents
module Sufia::UploadsControllerBehavior extend ActiveSupport::Concern included do load_and_authorize_resource class: Sufia::UploadedFile end def create @upload.attributes = { file: params[:files].first, user: current_user } @upload.save! end def destroy @upload.destroy head :no_content end end
Version data entries
13 entries across 13 versions & 1 rubygems