More ActiveRecord Association .length -> .size Optimizations

This commit is contained in:
Jacques Distler 2009-09-04 00:09:39 -05:00
parent 342298ed0e
commit 34c4306867
6 changed files with 14 additions and 14 deletions

View file

@ -54,7 +54,7 @@ module ApplicationHelper
# Create a hyperlink to a particular revision of a Wiki page
def link_to_revision(page, revision_number, text = nil, mode = nil, html_options = {})
revision_number == page.revisions.length ?
revision_number == page.revisions.size ?
link_to(
text || page.plain_name,
{:web => @web.address, :action => 'show', :id => page.name,