Class: Workarea::Admin::DataFileTaxImportsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/workarea/admin/data_file_tax_imports_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#current_user, #find_sort, #wrap_in_view_model, wrap_in_view_model

Methods included from Publishing

#allow_publishing!, #allow_publishing?, #set_publishing_options

Methods included from Visiting

#most_visited

Instance Method Details

#createObject



11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/workarea/admin/data_file_tax_imports_controller.rb', line 11

def create
  @import = DataFile::TaxImport.new(import_params)

  if @import.save
    flash[:success] = t('workarea.admin.data_file_tax_imports.flash_messages.processing')
    redirect_to tax_category_path(@tax_category)
  else
    render :new, status: :unprocessable_entity
  end
end

#newObject



7
8
9
# File 'app/controllers/workarea/admin/data_file_tax_imports_controller.rb', line 7

def new
  @import = DataFile::TaxImport.new
end