Class: DelayedSystemJobsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/delayed_system_jobs_controller.rb

Instance Method Summary collapse

Methods inherited from ApplicationController

#robot?

Instance Method Details

#destroyObject

DELETE /delayed_systems_job/1 DELETE /delayed_systems_job/1.xml


24
25
26
27
28
29
30
31
32
33
34
35
# File 'app/controllers/delayed_system_jobs_controller.rb', line 24

def destroy
  if has_permissions_or_redirect(:admin, root_path)

    delayed_system_job = DelayedSystemJob.find(params[:id])
    delayed_system_job.destroy

    respond_to do |format|
      format.html { redirect_to("/delayed_system_jobs") }
      format.xml { head :ok }
    end
  end
end

#indexObject


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

def index
  @no_pad = true
  if has_permissions_or_redirect(:admin, root_path)

    @delayed_system_jobs = DelayedSystemJob.all

    respond_to do |format|
      format.html { render :html => @delayed_system_jobs, :layout => "cmu_sv" } # index.html.erb
      format.js { render :js => @delayed_system_jobs, :layout => false }
      format.xml { render :xml => @delayed_system_jobs }
    end
  end
end