Explorar el Código

Use count rather than size to count posts efficiently

master
Adrian Short hace 12 años
padre
commit
9469d67efd
Se han modificado 2 ficheros con 2 adiciones y 2 borrados
  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 Ver fichero

@@ -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 Ver fichero

@@ -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


Cargando…
Cancelar
Guardar