From: Jean-Philippe Lang Date: Wed, 8 Aug 2012 18:47:52 +0000 (+0000) Subject: Code cleanup. X-Git-Tag: 2.1.0~155 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2e4f3d5a60c15887359d54a62449272731dc9137;p=redmine.git Code cleanup. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10177 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/issue.rb b/app/models/issue.rb index 8ceec87a3..6e0f3cc89 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -583,7 +583,7 @@ class Issue < ActiveRecord::Base if new_record? nil else - journals.first(:order => "#{Journal.table_name}.id DESC").try(:id) + journals.maximum(:id) end end