3. DEN ROGUE ERROR APPEARD
#{l(@order.purchased_at, format: :order_date)}
ActionView::Template::Error
Object must be a Date, DateTime or Time
object. nil given.
SILLY PUPPY, PURCHASD AT SHUD NOT
BE NIL
4. HER LIEZ TEH PROBLEM
@order.purchased_at = Time.current
@order.confirm!
send_notifications
10. AN TEH CEILIN KAT SED
Locking::Pessimistic provides support for row-
level locking using SELECT … FOR UPDATE
11. I KNOE HOW DAT WERKZ
t1 select … for update
t2 select … for update
t1 purchased_at = Time.zone.now
send_notifications
t2 select … for update returns
12. AN TEH CEILIN KAT SED
You can start a transaction and acquire the lock
in one go by calling with_lock with a block.