Haml에서 조건이 참인 경우 클래스 추가 만약 post.published? .post / Post stuff 그렇지 않으면 .post.gray / Post stuff 나는 이것을 rails helper로 구현했으며 추악한 것처럼 보인다. = content_tag :div, :class => "post" + (" gray" unless post.published?).to_s do / Post stuff 두 번째 변형 : = content_tag :div, :class => "post" + (post.published? ? "" : " gray") do / Post stuff 더 간단하고 haml에 특정한 방법이 있습니까? UPD. Haml 특정이지만 여전히 간단하지는 않습니다. %div{:class =>..