-
-
Save toolmantim/597809 to your computer and use it in GitHub Desktop.
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
def pluralize(number, singular) | |
<<-HTML | |
<span class="#{singular.downcase}"> | |
#{number} | |
<span>#{number == 1 ? singular : singular.pluralize}</span> | |
</span> | |
HTML | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
the hyphen before the HTML on line 2 is unnecessary, but it kicks my textmate into syntax-highlighting the heredoc with the HTML bundle (which is friggin awesome BTW, works with any language!)