Sha256: bd8d6bb6a244a2fe8d39a2470bf8de4b49b8f294e18c1b126788fe3e156128e0

Contents?: true

Size: 522 Bytes

Versions: 12

Compression:

Stored size: 522 Bytes

Contents

module ForemanTasks
  class TasksController < ::ApplicationController
    include Foreman::Controller::AutoCompleteSearch

    def show
      @task = Task.find(params[:id])
    end

    def index
      params[:order] ||= 'started_at DESC'
      @tasks         = Task.
          search_for(params[:search], :order => params[:order]).
          paginate(:page => params[:page])
    end

    # we need do this to make the Foreman helpers working properly
    def controller_name
      'foreman_tasks_tasks'
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
foreman-tasks-0.5.3 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.5.2 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.5.1 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.5.0 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.4.0 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.6 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.5 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.4 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.3 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.2 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.1 app/controllers/foreman_tasks/tasks_controller.rb
foreman-tasks-0.3.0 app/controllers/foreman_tasks/tasks_controller.rb