This is funky. I don't like having the opening tag in the conditional and the closing tag outside of it. It's not immediately obvious what's happening. I would probably make a helper method that returns the class name that you want (or `nil`).