I prefer moving logic out of curly braces in HAML:

```ruby
- offer_class = 'completed'  if latest_membership && latest_membership.auction.closed?
%span{ class: offer_class } Get Offers
```