mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 02:46:13 +01:00
Display flash message if enumerations were actually saved (#19861).
git-svn-id: http://svn.redmine.org/redmine/trunk@14691 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -21,12 +21,14 @@ class ProjectEnumerationsController < ApplicationController
|
|||||||
|
|
||||||
def update
|
def update
|
||||||
if params[:enumerations]
|
if params[:enumerations]
|
||||||
Project.transaction do
|
saved = Project.transaction do
|
||||||
params[:enumerations].each do |id, activity|
|
params[:enumerations].each do |id, activity|
|
||||||
@project.update_or_create_time_entry_activity(id, activity)
|
@project.update_or_create_time_entry_activity(id, activity)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
flash[:notice] = l(:notice_successful_update)
|
if saved
|
||||||
|
flash[:notice] = l(:notice_successful_update)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
redirect_to settings_project_path(@project, :tab => 'activities')
|
redirect_to settings_project_path(@project, :tab => 'activities')
|
||||||
|
|||||||
Reference in New Issue
Block a user