summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/models/news.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/news.rb b/app/models/news.rb
index a22947248..2186beaed 100644
--- a/app/models/news.rb
+++ b/app/models/news.rb
@@ -56,7 +56,7 @@ class News < ActiveRecord::Base
# returns latest news for projects visible by user
def self.latest(user = User.current, count = 5)
- visible(user).includes([:author, :project]).order("#{News.table_name}.created_on DESC").limit(count)
+ visible(user).includes([:author, :project]).order("#{News.table_name}.created_on DESC").limit(count).all
end
private