Files
fizzy/app/controllers/assignments/swaps_controller.rb
T
2024-11-21 19:58:21 -06:00

18 lines
427 B
Ruby

class Assignments::SwapsController < ApplicationController
include BubbleScoped, BucketScoped
def create
@bubble.swap_assignment incoming_assignee, outgoing_assignee
redirect_to @bubble
end
private
def incoming_assignee
@bucket.users.active.find params.expect(:incoming_assignee_id)
end
def outgoing_assignee
@bucket.users.active.find params.expect(:outgoing_assignee_id)
end
end