mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-11 01:44:23 +01:00
make sure toggle_check and deleting of todos, recurring_todos and projects work in the new done views
This commit is contained in:
parent
35f947ec57
commit
6e97541ab3
10 changed files with 88 additions and 41 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue