Class: EventImportResultsController

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

Instance Method Summary collapse

Instance Method Details

#destroyObject

DELETE /event_import_results/1 DELETE /event_import_results/1.json



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

def destroy
  @event_import_result.destroy

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

#indexObject

GET /event_import_results GET /event_import_results.json



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

def index
  @event_import_file = EventImportFile.find_by(id: params[:event_import_file_id])
  if @event_import_file
    @event_import_results = @event_import_file.event_import_results.order(created_at: :asc).page(params[:page])
  else
    @event_import_results = EventImportResult.order(created_at: :desc).page(params[:page])
  end

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

#showObject

GET /event_import_results/1 GET /event_import_results/1.json



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

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