mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-27 12:28:48 +01:00
#1955: Use existing user parameter in taggable models instead of passing it
This commit is contained in:
parent
5394973346
commit
f6d1f243c5
5 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue