Sha256: bffa5052bdbfdc746b36e19ce4a095c5aad00bab08ab83f7603bd91afd66e9fa
Contents?: true
Size: 359 Bytes
Versions: 10
Compression:
Stored size: 359 Bytes
Contents
module Hyrax::UploadsControllerBehavior extend ActiveSupport::Concern included do load_and_authorize_resource class: Hyrax::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
10 entries across 10 versions & 2 rubygems