]> source.dussan.org Git - redmine.git/commitdiff
backout r12540 : remove unneeded Relation#all from News#latest
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 07:06:50 +0000 (07:06 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 9 Jan 2014 07:06:50 +0000 (07:06 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12566 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/news.rb

index a22947248556012c3798535801f517ad59d3f7ac..2186beaeded811a6ef43f0c6144574ba269f7e60 100644 (file)
@@ -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