Browse Source

Pass through current user

pull/143/head
baarkerlounger 4 years ago
parent
commit
8dc0f37df6
  1. 2
      app/controllers/bulk_upload_controller.rb
  2. 2
      app/models/bulk_upload.rb

2
app/controllers/bulk_upload_controller.rb

@ -10,7 +10,7 @@ class BulkUploadController < ApplicationController
file = upload_params.tempfile
content_type = upload_params.content_type
@bulk_upload = BulkUpload.new(file, content_type)
@bulk_upload.process
@bulk_upload.process(current_user)
if @bulk_upload.errors.present?
render "case_logs/bulk_upload", status: :unprocessable_entity
else

2
app/models/bulk_upload.rb

@ -15,7 +15,7 @@ class BulkUpload
@content_type = content_type
end
def process
def process(current_user)
return unless valid_content_type?
xlsx = Roo::Spreadsheet.open(@file, extension: :xlsx)

Loading…
Cancel
Save