]> source.dussan.org Git - redmine.git/commitdiff
code layout clean up app/models/news.rb
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 5 Jan 2012 03:46:19 +0000 (03:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Thu, 5 Jan 2012 03:46:19 +0000 (03:46 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8513 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/news.rb

index 551568fd03221b540e9a1a5f10fd4137b723ceb3..763063d13f3fe4da2ec478f1c242a8b213d3bd1a 100644 (file)
@@ -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