Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

refactor to use unless / empty?

  • Loading branch information...
commit 89a36f7634025b9f2b7ce6a2caa6f2ff054394c7 1 parent baa21df
@tenderlove tenderlove authored
Showing with 6 additions and 6 deletions.
  1. +6 −6 app/views/accounts/_account.html.erb
View
12 app/views/accounts/_account.html.erb
@@ -5,7 +5,7 @@
<td><%= account.username %></td>
</tr>
- <% if account.names.length > 0 %>
+ <% unless account.names.empty? %>
<tr>
<td>Names:</td>
<td>
@@ -16,7 +16,7 @@
</tr>
<% end %>
- <% if account.nicks.length > 0 %>
+ <% unless account.nicks.empty? %>
<tr>
<td>Nicknames:</td>
<td>
@@ -27,7 +27,7 @@
</tr>
<% end %>
- <% if account.sites.length > 0 %>
+ <% unless account.sites.empty? %>
<tr>
<td>Sites:</td>
<td>
@@ -38,7 +38,7 @@
</tr>
<% end %>
- <% if account.services.length > 0 %>
+ <% unless account.services.empty? %>
<tr>
<td>Services:</td>
<td>
@@ -49,7 +49,7 @@
</tr>
<% end %>
- <% if account.portraits.length > 0 %>
+ <% unless account.portraits.empty? %>
<tr>
<td>Portraits:</td>
<td>
@@ -62,7 +62,7 @@
<!-- FIXME: unsure how to link to ISBN. :-( -->
<!--
- <% if account.books.length > 0 %>
+ <% unless account.books.empty? %>
<tr>
<td>Books:</td>
<td>
Please sign in to comment.
Something went wrong with that request. Please try again.