Files
fizzy/app/controllers/collections/entropy_configurations_controller.rb
T
2025-09-24 16:22:42 +02:00

18 lines
545 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 }),
turbo_stream_flash(notice: "Saved")
]
end
private
def entropy_configuration_params
params.expect(collection: [ :auto_postpone_period ])
end
end