diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-15 22:11:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-03-15 22:11:02 +0000 |
commit | e6f58e4dcc2f7552109da139857a19b81c6f1fe1 (patch) | |
tree | b2b7aee365335b13fb3f8d2ebac44b518cbbcd71 /app/models/news.rb | |
parent | 192b9008bdc5590a041166635eb1aecae78df992 (diff) | |
download | redmine-e6f58e4dcc2f7552109da139857a19b81c6f1fe1.tar.gz redmine-e6f58e4dcc2f7552109da139857a19b81c6f1fe1.zip |
fixed #9308 table_name pre/suffix support
git-svn-id: http://redmine.rubyforge.org/svn/trunk@337 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/news.rb')
-rw-r--r-- | app/models/news.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/news.rb b/app/models/news.rb index 848517302..cd130e96d 100644 --- a/app/models/news.rb +++ b/app/models/news.rb @@ -24,6 +24,6 @@ class News < ActiveRecord::Base # returns latest news for projects visible by user def self.latest(user=nil, count=5) - find(:all, :limit => count, :conditions => Project.visible_by(user), :include => [ :author, :project ], :order => "news.created_on DESC") + find(:all, :limit => count, :conditions => Project.visible_by(user), :include => [ :author, :project ], :order => "#{News.table_name}.created_on DESC") end end |