diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-19 17:04:47 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2015-10-19 17:04:47 +0000 |
commit | e5ccc400d5884d5c403bbda11e7f0a411c803670 (patch) | |
tree | 2d6b046f13a2a90861b0af13c01902c8fc3ee771 /app/controllers/project_enumerations_controller.rb | |
parent | 3795c22730f470146b02110a168276dce45755a4 (diff) | |
download | redmine-e5ccc400d5884d5c403bbda11e7f0a411c803670.tar.gz redmine-e5ccc400d5884d5c403bbda11e7f0a411c803670.zip |
Display flash message if enumerations were actually saved (#19861).
git-svn-id: http://svn.redmine.org/redmine/trunk@14691 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/project_enumerations_controller.rb')
-rw-r--r-- | app/controllers/project_enumerations_controller.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/project_enumerations_controller.rb b/app/controllers/project_enumerations_controller.rb index c3d2da928..2326eb2c4 100644 --- a/app/controllers/project_enumerations_controller.rb +++ b/app/controllers/project_enumerations_controller.rb @@ -21,12 +21,14 @@ class ProjectEnumerationsController < ApplicationController def update if params[:enumerations] - Project.transaction do + saved = Project.transaction do params[:enumerations].each do |id, activity| @project.update_or_create_time_entry_activity(id, activity) end end - flash[:notice] = l(:notice_successful_update) + if saved + flash[:notice] = l(:notice_successful_update) + end end redirect_to settings_project_path(@project, :tab => 'activities') |