浏览代码

Use count rather than size to count posts efficiently

master
Adrian Short 12 年前
父节点
当前提交
9469d67efd
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. +1
    -1
      app/views/feeds/index.html.haml
  2. +1
    -1
      app/views/feeds/show.html.haml

+ 1
- 1
app/views/feeds/index.html.haml 查看文件

@@ -17,7 +17,7 @@
%td
.feed_title
= link_to f.title, f
%td.right= f.posts.size
%td.right= f.posts.count
%td
- if f.last_fetched.nil?
never


+ 1
- 1
app/views/feeds/show.html.haml 查看文件

@@ -9,7 +9,7 @@
Validate

%p
= pluralize(@feed.posts.size, "post")
= pluralize(@feed.posts.count, "post")

%p
= link_to @feed.feed_url, @feed.feed_url


正在加载...
取消
保存