Created
May 8, 2012 21:49
-
-
Save rfischer20/2639659 to your computer and use it in GitHub Desktop.
String heredocs for inserting node content
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
add_comment = (data) -> | |
if data.state == "success" | |
html = """ | |
<tr> | |
<td class='avatar'> | |
<img src='#{data.comment.avatar_url}'/> | |
</td> | |
<td> | |
<h4>#{data.comment.name}<h4> | |
<h5>#{data.comment.date}</h5> | |
<p>#{data.comment.message}</p> | |
</td> | |
</tr> | |
""" | |
$("#add_comment_row").before(html) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment