make sure toggle_check and deleting of todos, recurring_todos and projects work in the new done views

This commit is contained in:
Reinier Balt 2011-06-21 11:03:23 +02:00
parent 35f947ec57
commit 6e97541ab3
10 changed files with 88 additions and 41 deletions

View file

@ -0,0 +1,15 @@
class MakeOldRecurringTodosValidate < ActiveRecord::Migration
def self.up
RecurringTodo.find(:all).each do |rt|
# show_always may not be nil
rt.show_always = false if rt.show_always.nil?
# start date should be filled
rt.start_from = rt.created_at if rt.start_from.nil? || rt.start_from.blank?
rt.save!
end
end
def self.down
# no down: leave them validatable
end
end