]> source.dussan.org Git - redmine.git/commitdiff
use Rails3 Active Record syntax in DocumentCategory model
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 22 Aug 2012 00:13:31 +0000 (00:13 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 22 Aug 2012 00:13:31 +0000 (00:13 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10228 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/document_category.rb

index c22b81e5b112eee43be4b56d4adb79e0df3529d2..19bacc8d89915e01af2fc857ef5a0feee6cf25ef 100644 (file)
@@ -34,9 +34,7 @@ class DocumentCategory < Enumeration
 
   def self.default
     d = super
-    if d.nil?
-      d = find(:first)
-    end
+    d = first if d.nil?
     d
   end
 end