mirror of
https://github.com/we-promise/sure.git
synced 2026-04-19 03:54:08 +00:00
Allow CSV imports to be configured with single or multi-account mode (#1943)
* Allow CSV imports to be configured to a single account or multiple accounts * Initialize import directly from accounts page * Fix brakeman warnings * Fix schema * Fix Synth check
This commit is contained in:
@@ -18,7 +18,8 @@ class ImportsController < ApplicationController
|
||||
end
|
||||
|
||||
def create
|
||||
import = Current.family.imports.create! import_params
|
||||
account = Current.family.accounts.find_by(id: params.dig(:import, :account_id))
|
||||
import = Current.family.imports.create!(type: import_params[:type], account: account)
|
||||
|
||||
redirect_to import_upload_path(import)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user