Files
fizzy/app/controllers/collections/entropy_configurations_controller.rb
T
Mike Dalessio 263bc486ed Collection entropy config edits render a turbo frame
so we don't disturb the rest of the edit page.
2025-07-02 22:24:41 -04:00

15 lines
504 B
Ruby

class Collections::EntropyConfigurationsController < ApplicationController
include CollectionScoped
def update
@collection.entropy_configuration.update!(entropy_configuration_params)
render turbo_stream: turbo_stream.replace([ @collection, :entropy_configuration ], partial: "collections/edit/auto_close", locals: { collection: @collection })
end
private
def entropy_configuration_params
params.expect(collection: [ :auto_close_period, :auto_reconsider_period ])
end
end