diff --git a/db/migrate/20120412072508_add_rendered_notes.rb b/db/migrate/20120412072508_add_rendered_notes.rb index 25fa4603..bbf813c4 100644 --- a/db/migrate/20120412072508_add_rendered_notes.rb +++ b/db/migrate/20120412072508_add_rendered_notes.rb @@ -9,7 +9,11 @@ class AddRenderedNotes < ActiveRecord::Migration # Call save! on each todo to force generation of rendered_todos i=0; max = Todo.all.count; start = Time.now Todo.all.each do |todo| - todo.save(false) + if Rails.version < '3.0' + todo.save(false) + else + todo.save(:validate => false) + end i = i + 1 if i%250==0 elapsed_sec = (Time.now-start)