From 0bd651330b839c2e5898f4029a9191f1cbc3b56f Mon Sep 17 00:00:00 2001 From: Toshi MARUYAMA Date: Thu, 5 Jan 2012 03:46:19 +0000 Subject: [PATCH] code layout clean up app/models/news.rb git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8513 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/news.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/news.rb b/app/models/news.rb index 551568fd0..763063d13 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -43,7 +43,10 @@ class News < ActiveRecord::Base # returns latest news for projects visible by user def self.latest(user = User.current, count = 5) - find(:all, :limit => count, :conditions => Project.allowed_to_condition(user, :view_news), :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC") + find(:all, :limit => count, + :conditions => Project.allowed_to_condition(user, :view_news), + :include => [ :author, :project ], + :order => "#{News.table_name}.created_on DESC") end private