* added a "show always" radio to the recurring todo forms
* added a show_always flag to recurring todos
* created a migration to convert existing recurring todos where show_from_delta==0
* recurring todos where show_from_delta is 0 are now shown the same day they're due

Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
piglop 2009-05-31 20:15:01 +08:00 committed by Reinier Balt
parent 8002eef8ab
commit 4e1e18da0f
6 changed files with 101 additions and 12 deletions

View file

@ -0,0 +1,16 @@
class AddShowAlwaysToRecurringTodo < ActiveRecord::Migration
def self.up
add_column :recurring_todos, :show_always, :boolean
recurring_todos = RecurringTodo.find(:all)
recurring_todos.each do |recurring_todo|
if recurring_todo.show_from_delta == 0 or recurring_todo.show_from_delta.nil?
recurring_todo.show_always = true
recurring_todo.save!
end
end
end
def self.down
remove_column :recurring_todos, :show_always
end
end