mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 19:20:13 +01:00
Convert to project did not use current_user so new projects were always linked to the user with id 1.
This commit is contained in:
parent
c9566047fc
commit
dc811c8fc7
1 changed files with 2 additions and 2 deletions
|
|
@ -640,8 +640,8 @@ class TodosController < ApplicationController
|
|||
end
|
||||
|
||||
def convert_to_project
|
||||
@todo = Todo.find(params[:id])
|
||||
@project = Project.new(:name => @todo.description, :description => @todo.notes,
|
||||
@todo = current_user.todos.find(params[:id])
|
||||
@project = current_user.projects.new(:name => @todo.description, :description => @todo.notes,
|
||||
:default_context => @todo.context)
|
||||
@todo.destroy
|
||||
@project.save!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue