Skip to content

Commit

Permalink
Fix bug article archive/categories trying to display articles that ar…
Browse files Browse the repository at this point in the history
…e not published yet.
  • Loading branch information
Ludo van den Boom committed Oct 31, 2008
1 parent b870800 commit 60da74d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/views/articles/archive.html.haml
Expand Up @@ -7,7 +7,7 @@
- Category.all(:order => [:title]).each do |category|
%li
= link_to category, url(:category, category)
== (#{category.articles.count})
== (#{category.articles.count(:published_at.lte => Time.now)})

%h2 Browse by date
%ul
Expand Down
2 changes: 1 addition & 1 deletion app/views/categories/show.html.haml
Expand Up @@ -2,7 +2,7 @@

%h1= "Articles in #{@category}"
%ul.articles
- for article in @category.articles(:order => [:title])
- for article in @category.articles(:published_at.lte => Time.now, :order => [:title])
%li
= link_to_content(article)
\-
Expand Down

0 comments on commit 60da74d

Please sign in to comment.