Remove unnecessary string manipulation

This commit is contained in:
Jyri-Petteri Paloposki 2019-05-22 01:31:26 +03:00
parent 1e0f1bd611
commit 359f615bf7

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].sub! 'c', '')
@context = current_user.contexts.find(params[:todo][:context_id])
@todo.context = @context
@saved = @todo.save