Sha256: a07af5151860a65ceb0b3b3ef590c0db92ab092a1a73cb4d8f495164720bdc5d

Contents?: true

Size: 412 Bytes

Versions: 5

Compression:

Stored size: 412 Bytes

Contents

class Kuroko2::WorkersController < Kuroko2::ApplicationController
  before_action :set_worker, only: %i(update)

  def index
    @workers = Kuroko2::Worker.ordered.all
  end

  def update
    @worker.update_attributes(worker_params)
    redirect_to workers_path
  end

  private

  def set_worker
    @worker = Kuroko2::Worker.find(params[:id])
  end

  def worker_params
    params.permit(:suspended)
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
kuroko2-0.5.2 app/controllers/kuroko2/workers_controller.rb
kuroko2-0.5.1 app/controllers/kuroko2/workers_controller.rb
kuroko2-0.5.0 app/controllers/kuroko2/workers_controller.rb
kuroko2-0.4.6 app/controllers/kuroko2/workers_controller.rb
kuroko2-0.4.5 app/controllers/kuroko2/workers_controller.rb