🤓 danott.co

Today I Learned

Use date.to_s(:db) when you need to use a date in a Rails YAML fixture. My muscle memory reached for date.format(:db), but that’s wrong. It’s .to_s

cookie_monster:
  last_wanted_cookies_at: <%= 1.second.ago.to_s(:db) %>