Improve controllers and views

This commit is contained in:
2026-07-28 00:46:33 +02:00
parent eb2797bd90
commit eae0ee9d20
9 changed files with 25 additions and 28 deletions

View File

@@ -17,7 +17,7 @@ class Default::UnitsController < ApplicationController
def import
@unit.port!(current_user)
flash.now[:notice] = t('.success', unit: @unit)
flash.now.notice = t('.success', unit: @unit)
ensure
run_and_render :index
end
@@ -30,14 +30,14 @@ class Default::UnitsController < ApplicationController
def export
@unit.port!(nil)
flash.now[:notice] = t('.success', unit: @unit)
flash.now.notice = t('.success', unit: @unit)
ensure
run_and_render :index
end
def destroy
@unit.destroy!
flash.now[:notice] = t('.success', unit: @unit)
flash.now.notice = t('.success', unit: @unit)
ensure
run_and_render :index
end