diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-08-22 00:13:31 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2012-08-22 00:13:31 +0000 |
commit | d1a52fd3014b9b5cf84e6b074ce072173d51f8c7 (patch) | |
tree | 5963e4c715ce21e306b1c509c92a0dbe232d17bf /app/models/document_category.rb | |
parent | 377ef084ad9065930093187e6dc50035e6150f95 (diff) | |
download | redmine-d1a52fd3014b9b5cf84e6b074ce072173d51f8c7.tar.gz redmine-d1a52fd3014b9b5cf84e6b074ce072173d51f8c7.zip |
use Rails3 Active Record syntax in DocumentCategory model
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10228 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/document_category.rb')
-rw-r--r-- | app/models/document_category.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/models/document_category.rb b/app/models/document_category.rb index c22b81e5b..19bacc8d8 100644 --- a/app/models/document_category.rb +++ b/app/models/document_category.rb @@ -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 |