Be careful

This may be obvious to most but it almost caught me out.

# Bad
named_scope :current,
  :conditions => ["start_at < ? AND end_at > ?", Time.now, 1.days.ago]
# Good
named_scope :current,
  lambda{{ :conditions => ["start_at < ? AND end_at > ?", Time.now, 1.days.ago] }}

You really don’t want static times