Class: AgentImportResultsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/agent_import_results_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject

DELETE /agent_import_results/1 DELETE /agent_import_results/1.json



33
34
35
36
37
38
39
40
# File 'app/controllers/agent_import_results_controller.rb', line 33

def destroy
  @agent_import_result.destroy

  respond_to do |format|
    format.html { redirect_to agent_import_results_url, notice: t('controller.successfully_deleted', model: t('activerecord.models.agent_import_result')) }
    format.json { head :no_content }
  end
end

#indexObject

GET /agent_import_results GET /agent_import_results.json



7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'app/controllers/agent_import_results_controller.rb', line 7

def index
  @agent_import_file = AgentImportFile.where(id: params[:agent_import_file_id]).first
  if @agent_import_file
    @agent_import_results = @agent_import_file.agent_import_results.page(params[:page])
  else
    @agent_import_results = AgentImportResult.page(params[:page])
  end

  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @agent_import_results }
    format.text
  end
end

#showObject

GET /agent_import_results/1 GET /agent_import_results/1.json



24
25
26
27
28
29
# File 'app/controllers/agent_import_results_controller.rb', line 24

def show
  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @agent_import_result }
  end
end