I meant to mention this in your other day calculation code. Ruby has a bunch of really nice date handling methods. So this line could be: todo.update_attribute(:created_at, rand(3..9).days.ago)) or

todo.update_attribute(:created_at, Date.today - 5.days))

You don't have to change this code, it's fine - I just want you to see some other cools ways to do it.