Files
fizzy/app/controllers/cards/assignments_controller.rb
T
2025-11-25 13:46:14 -05:00

14 lines
437 B
Ruby

class Cards::AssignmentsController < ApplicationController
include CardScoped
def new
@assigned_to = @card.assignees.active.alphabetically.where.not(id: Current.user)
@users = @board.users.active.alphabetically.where.not(id: @card.assignees).where.not(id: Current.user)
fresh_when etag: [ @users, @card.assignees ]
end
def create
@card.toggle_assignment @board.users.active.find(params[:assignee_id])
end
end