make drag&drop todos from/to contexts work again

This commit is contained in:
scripty 2017-01-21 00:30:47 +01:00
parent 1ba829e960
commit 9c28bc737c
2 changed files with 2 additions and 1 deletions

View file

@ -397,7 +397,7 @@ class TodosController < ApplicationController
@todo = current_user.todos.find(params[:id])
@original_item_context_id = @todo.context_id
@original_item = current_user.todos.build(@todo.attributes) # create a (unsaved) copy of the original todo
@context = current_user.contexts.find(params[:todo][:context_id])
@context = current_user.contexts.find(params[:todo][:context_id].sub! 'c', '')
@todo.context = @context
@saved = @todo.save