#1955: Use existing user parameter in taggable models instead of passing it

This commit is contained in:
Jyri-Petteri Paloposki 2019-06-26 00:19:32 +03:00
parent 5394973346
commit f6d1f243c5
5 changed files with 12 additions and 12 deletions

View file

@ -106,7 +106,7 @@ class TodosController < ApplicationController
if @todo.errors.empty?
@todo.add_predecessor_list(p.predecessor_list)
@saved = @todo.save
@todo.tag_with(tag_list, current_user) if @saved && tag_list.present?
@todo.tag_with(tag_list) if @saved && tag_list.present?
@todo.block! if @todo.uncompleted_predecessors?
else
@saved = false
@ -194,7 +194,7 @@ class TodosController < ApplicationController
todo.block!
end
todo.tag_with(tag_list, current_user) if @saved && tag_list.present?
todo.tag_with(tag_list) if @saved && tag_list.present?
@todos << todo
@not_done_todos << todo if p.new_context_created || p.new_project_created
@ -1218,7 +1218,7 @@ end
def update_tags
if params[:tag_list]
@todo.tag_with(params[:tag_list], current_user)
@todo.tag_with(params[:tag_list])
@todo.tags.reload #force a reload for proper rendering
end
end