Class: Iron::Account::ImportsController

Inherits:
Iron::ApplicationController show all
Defined in:
app/controllers/iron/account/imports_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



11
12
13
14
15
16
# File 'app/controllers/iron/account/imports_controller.rb', line 11

def create
  @import = Account::Import.create!(import_params)
  @import.file.attach(params[:account_import][:file])
  @import.process_later
  redirect_to @import, notice: t("iron.account.imports.notifications.started")
end

#indexObject



3
4
5
# File 'app/controllers/iron/account/imports_controller.rb', line 3

def index
  @imports = Account::Import.order(created_at: :desc)
end

#newObject



7
8
9
# File 'app/controllers/iron/account/imports_controller.rb', line 7

def new
  @import = Account::Import.new
end

#showObject



18
19
20
# File 'app/controllers/iron/account/imports_controller.rb', line 18

def show
  @import = Account::Import.find(params[:id])
end