##// END OF EJS Templates
Display flash message if enumerations were actually saved (#19861)....
Jean-Philippe Lang -
r14309:e5ccc400d588
parent child
Show More
@@ -21,13 +21,15 class ProjectEnumerationsController < ApplicationController
21
21
22 def update
22 def update
23 if params[:enumerations]
23 if params[:enumerations]
24 Project.transaction do
24 saved = Project.transaction do
25 params[:enumerations].each do |id, activity|
25 params[:enumerations].each do |id, activity|
26 @project.update_or_create_time_entry_activity(id, activity)
26 @project.update_or_create_time_entry_activity(id, activity)
27 end
27 end
28 end
28 end
29 if saved
29 flash[:notice] = l(:notice_successful_update)
30 flash[:notice] = l(:notice_successful_update)
30 end
31 end
32 end
31
33
32 redirect_to settings_project_path(@project, :tab => 'activities')
34 redirect_to settings_project_path(@project, :tab => 'activities')
33 end
35 end
General Comments 0
You need to be logged in to leave comments. Login now