Permalink
Browse files

Use Array#length instead of Array#count (Ruby 1.8.6 compatibility)

  • Loading branch information...
1 parent c1aca38 commit 8d4a45f6580038f53690862079919c1240c5d34f @lsegal lsegal committed Jun 7, 2009
Showing with 3 additions and 3 deletions.
  1. +3 −3 templates/default/attributes/html/header.erb
@@ -7,7 +7,7 @@
<table>
<% object.attributes[scope].sort_by {|o| o.to_s.downcase }.each do |name, rw| %>
<% aliases = (rw[:read] || rw[:write]).aliases %>
- <tr class="<%= 'hasaliases' if aliases.count > 0 %>">
+ <tr class="<%= 'hasaliases' if aliases.length > 0 %>">
<th class='signature'>
<span class='name'><%= h name %></span>
</td>
@@ -31,11 +31,11 @@
<% end %>
</td>
</tr>
- <% if aliases.count > 0 %>
+ <% if aliases.length > 0 %>
<tr>
<td colspan='4' class='aliases'><span class='text'>Also known as:</span>
<% aliases.each_with_index do |obj, i| %>
- <span class='alias'><%= h obj.name.to_s.sub(/=$/, '') %></span><%= "," if i < aliases.count - 1 %>
+ <span class='alias'><%= h obj.name.to_s.sub(/=$/, '') %></span><%= "," if i < aliases.length - 1 %>
<% end %>
</td>
</tr>

0 comments on commit 8d4a45f

Please sign in to comment.