Skip to content

Instantly share code, notes, and snippets.

@diebels727
Created April 5, 2011 22:41
Show Gist options
  • Save diebels727/904731 to your computer and use it in GitHub Desktop.
Save diebels727/904731 to your computer and use it in GitHub Desktop.
Change patterns
#like this ...
<p>
<b>Notes:</b>
<% if @sighting.notes.nil? %>
<span id="notes">&#160;</span>
<% else %>
<span id="notes"><%= @sighting.notes %></span>
<% end %>
</p>
#To something more like this
<p>
<b>Notes:</b>
<span id=<%=@sighting.class.downcase%>> <%= @sighting.notes || '&#160;' %></span>
</p>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment