From 89802e7e1987d03ebb2bce0057f468d204e7bc52 Mon Sep 17 00:00:00 2001 From: lukemelia Date: Fri, 21 Jul 2006 03:22:57 +0000 Subject: [PATCH] Make check_tickler's conversion of Deferred actions to Immediate ones bypass validation. Fixes #329 git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@287 a4c988fc-2ded-0310-b66e-134b36920a42 --- tracks/app/controllers/todo_controller.rb | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tracks/app/controllers/todo_controller.rb b/tracks/app/controllers/todo_controller.rb index 65c45267..1617c0ab 100644 --- a/tracks/app/controllers/todo_controller.rb +++ b/tracks/app/controllers/todo_controller.rb @@ -255,13 +255,11 @@ class TodoController < ApplicationController self.init now = Date.today() @due_tickles = @user.todos.find(:all, :conditions => ['type = ? AND (show_from < ? OR show_from = ?)', "Deferred", now, now ], :order => "show_from ASC") - unless @due_tickles.empty? - # Change the due tickles to type "Immediate" - @due_tickles.each do |t| - t[:type] = "Immediate" - t.show_from = nil - t.save - end + # Change the due tickles to type "Immediate" + @due_tickles.each do |t| + t[:type] = "Immediate" + t.show_from = nil + t.save_with_validation(false) end end