This is nothing new, but, having seen enough Rails developers using custom helpers to do the same thing, I thought it might warrant a quick tip.
If you’re entering dates/times in your fixtures, you’re probably familiar with this trick:
---
item1:
id: 1
name: foo
created_at: <%= 3.days.ago.to_s(:db) %>
Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago