Sha256: 431dd81b0ad5b78e1c1c2157a667ccec12d66f0b94a23ddbf9aadcbe53b0e7ae

Contents?: true

Size: 421 Bytes

Versions: 5

Compression:

Stored size: 421 Bytes

Contents

class TasksController < ApplicationController
  skip_before_filter :session_expiry, :update_activity_time, :set_taxonomy, :only => [:show]

  def show
    id = params[:id]
    queue = Rails.cache.fetch(id)
    respond_to do |format|
      format.html {
        @tasks = queue.nil? ? [] : JSON(queue)
        return render :partial => 'list' if ajax?
      }
      format.json { render :json => queue }
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
foreman_discovery-1.0.0 test/foreman_app/app/controllers/tasks_controller.rb
foreman_discovery-1.0.0.rc4 test/foreman_app/app/controllers/tasks_controller.rb
foreman_discovery-1.0.0.rc3 test/foreman_app/app/controllers/tasks_controller.rb
foreman_discovery-1.0.0.rc2 test/foreman_app/app/controllers/tasks_controller.rb
foreman_discovery-1.0.0.rc1 test/foreman_app/app/controllers/tasks_controller.rb