From ca4dcdc3af4a61870f5fb6651c566d50492a55bb Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 9 Jan 2014 00:05:14 +0000 Subject: [PATCH] remove unneeded Relation#all from News#latest git-svn-id: http://svn.redmine.org/redmine/trunk@12540 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/news.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/news.rb b/app/models/news.rb index 2186beaed..a22947248 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).all + visible(user).includes([:author, :project]).order("#{News.table_name}.created_on DESC").limit(count) end private -- 2.39.5