Files
fizzy/app/controllers/buckets/workflows_controller.rb
T
Mike Dalessio b7c2369988 Fix setting the workflow on a collection
The previous implementation would delete all accesses if the bucket
was not all_access.

I think it's simpler to move the bucket workflow into a separate
Buckets::WorkflowsController, rather than deal with different sets of
params from different forms in the existing BucketsController.
2025-03-30 09:24:56 -04:00

17 lines
384 B
Ruby

class Buckets::WorkflowsController < ApplicationController
include BucketScoped
before_action :set_workflow
def update
@bucket.update! workflow: @workflow
redirect_to bubbles_path(bucket_ids: [ @bucket ])
end
private
def set_workflow
@workflow = Current.account.workflows.find(params.expect(bucket: [ :workflow_id ]).require(:workflow_id))
end
end