If post.published?
post.published?
.post / Post stuff
Otherwise
.post.gray / Post stuff
I\'ve implemente
HAML has a nice built in way to handle this:
.post{class: [!post.published? && "gray"] }
The way that this works is that the conditional gets evaluated and if true, the string gets included in the classes, if not it won't be included.