First whack at "promote to project" function

Progress on issue #64
This commit is contained in:
Eric Allen 2009-12-20 13:36:05 -05:00
parent ce3897a2bd
commit bbbb3a1886
3 changed files with 18 additions and 0 deletions

View file

@ -638,6 +638,15 @@ class TodosController < ApplicationController
end
render :inline => "<%= auto_complete_result2(@items) %>"
end
def convert_to_project
@todo = Todo.find(params[:id])
@project = Project.new(:name => @todo.description, :description => @todo.notes,
:default_context => @todo.context)
@todo.destroy
@project.save!
redirect_to project_url(@project)
end
private