Please read for an updated status on RailsCasts:
Learn more or hide this
GitHub User: feiniel
Hi Ryan, I was wondering if you could explain the
where("date(purchased_at) = ?", date).sum(:total_price)
part (like the syntax of the where 'date(purchased_at) = ?', date especially). I get what it's doing and it sounds awesome from such a short line but I tried it in the rails console and it doesn't seem to work for me...