]> source.dussan.org Git - redmine.git/commitdiff
Code cleanup.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 8 Aug 2012 18:47:52 +0000 (18:47 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Wed, 8 Aug 2012 18:47:52 +0000 (18:47 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10177 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/issue.rb

index 8ceec87a3c752aa547c9ec1615bf8229a7af447f..6e0f3cc89a1f1a64f13501a5a549cf81d2ce5c33 100644 (file)
@@ -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