Files
fizzy/app/controllers/collections/entropies_controller.rb
T
2025-11-02 13:11:41 +01:00

18 lines
476 B
Ruby

class Collections::EntropiesController < ApplicationController
include CollectionScoped
def update
@collection.entropy.update!(entropy_params)
render turbo_stream: [
turbo_stream.replace([ @collection, :entropy], partial: "collections/edit/auto_close", locals: { collection: @collection }),
turbo_stream_flash(notice: "Saved")
]
end
private
def entropy_params
params.expect(collection: [ :auto_postpone_period ])
end
end