Class: Apify::Scheduler::HistoriesController

Inherits:
ApplicationController show all
Defined in:
app/controllers/apify/scheduler/histories_controller.rb

Instance Method Summary collapse

Instance Method Details

#destroyObject

DELETE /histories/1



13
14
15
16
# File 'app/controllers/apify/scheduler/histories_controller.rb', line 13

def destroy
  @history.destroy
  redirect_to :back, notice: 'History was successfully destroyed.'
end

#indexObject

GET /histories



7
8
9
10
# File 'app/controllers/apify/scheduler/histories_controller.rb', line 7

def index
  @unit = Unit.find(params[:unit_id])
  @histories = @unit.histories.order('created_at DESC')
end