Class: Backend::ImportsController

Inherits:
BaseController show all
Defined in:
app/controllers/backend/imports_controller.rb

Instance Attribute Summary

Attributes inherited from ApplicationController

#current_theme

Instance Method Summary collapse

Methods inherited from BaseController

account_lettering_states_crit, accounts_range_crit, amount_range_crit, crit_params, journal_entries_states_crit, journal_letter_crit, journal_period_crit, journals_crit, search_conditions

Methods inherited from ApplicationController

#after_sign_in_path_for, #authorized?, human_action_name, #human_action_name, #session_controller?

Instance Method Details

#abortObject


48
49
50
51
52
53
# File 'app/controllers/backend/imports_controller.rb', line 48

def abort
  @import = find_and_check
  return unless @import
  @import.abort
  redirect_to params[:redirect] || { action: :index }
end

#progressObject


42
43
44
45
46
# File 'app/controllers/backend/imports_controller.rb', line 42

def progress
  @import = find_and_check
  return unless @import
  render partial: 'progress', locals: { import: @import }
end

#runObject


35
36
37
38
39
40
# File 'app/controllers/backend/imports_controller.rb', line 35

def run
  import = find_and_check
  return unless import
  import.run_later
  redirect_to params[:redirect] || { action: :index }
end