I have a comments system working and ready. When the page is loaded and there aren't any comments, I have:
The previous code creates an ID for my RJS file to remove when a comment is added:<% if @comments_submitted.empty? %>
<center><b><span id="nocomments">No one has commented yet. Be the first!</span></b></center>
<% else %>
Obviously, I need some sort of flow control! Because when there are comments, the "nocomments" span ID is not there. This throws an error, since there is no ID for myRJS file to replace!page.replace_html 'nocomments', ""