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

app/models/news.rb

index 2186beaeded811a6ef43f0c6144574ba269f7e60..a22947248556012c3798535801f517ad59d3f7ac 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).all
+    visible(user).includes([:author, :project]).order("#{News.table_name}.created_on DESC").limit(count)
   end
 
   private