b7c2369988
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.
17 lines
384 B
Ruby
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
|