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:
parent
d9624990e0
commit
ca4dcdc3af
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue