remove unneeded Relation#all from News#latest

git-svn-id: http://svn.redmine.org/redmine/trunk@12540 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2014-01-09 00:05:14 +00:00
parent d9624990e0
commit ca4dcdc3af
1 changed files with 1 additions and 1 deletions

View File

@ -56,7 +56,7 @@ class News < ActiveRecord::Base
# returns latest news for projects visible by user # returns latest news for projects visible by user
def self.latest(user = User.current, count = 5) 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 end
private private