Make new tasks left-most task of parent instead of right-most

pull/6827/head
friflaj 15 years ago
parent fcd52f6eaa
commit 86a6dc8fa2
  1. 3
      app/controllers/tasks_controller.rb

@ -13,7 +13,8 @@ class TasksController < ApplicationController
task = Task.new(attribs)
if task.save!
task.insert_at 1
c = task.parent.children
task.move_to_left_of c[0] if c[0].id != task.id
render :partial => "task", :object => task
else
text = "ERROR"

Loading…
Cancel
Save