Last active
December 19, 2015 11:19
-
-
Save taea/5946682 to your computer and use it in GitHub Desktop.
if ○○だった時だけ classをつける
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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 class></span>
になりますね。(好みの問題?)