Fix flash message with error of status change

This commit is contained in:
Alexander Meindl 2024-10-21 18:29:33 +02:00
parent 97d7647e1a
commit 6fb1dfaeec

View File

@ -25,11 +25,12 @@ class AdditionalsChangeStatusController < ApplicationController
journal: @issue.current_journal
if !@issue.save || issue_old_status_id == @issue.status_id
if issue_old_status_id == @issue.status_id
flash_msg :error_issue_status_could_not_changed
else
flash_msg :save_error, obj: @issue
end
flash[:error] = if issue_old_status_id == @issue.status_id
flash_msg :error_issue_status_could_not_changed
else
flash_msg :save_error, obj: @issue
end
return redirect_to(issue_path(@issue))
end