This should be a view helper, but let's take a stab at simplifying:

```ruby
def can_participate?(latest_membership)
  return false unless latest_membership
  return true if latest_membership.pending? || latest_membership.invited?

  correct_auction = last_confirmed_auction.nil? || last_confirmed_auction == latest_membership.auction
  auction_open = !latest_membership.auction.closed
  latest_membership.confirmed? && auction_open && correct_auction
end
```

We can simplify drastically simplify by early exiting for two trumping conditions (that is, they would have caused a short-circuit and canceled evaluating the rest of the expression anyway). For the rest, storing to named variable the remaining conditional much easier to follow. *Note* I would strongly advocate adding a test for this view helper. I've been bitten bad by complicated view logic *just like this*.