if ○○だった時だけ classをつける
%span.count-num{ class: "#{'unread' if hoge_count > 0}" }<>= link_to hoge_count, hoge_path |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
%span.count-num{ class: "#{'unread' if hoge_count > 0}" }<>= link_to hoge_count, hoge_path |
This comment has been minimized.
fukajun commentedJun 10, 2014
これ、条件に当てはまらない時
<span class></span>
になりますね。(好みの問題?)