diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-04 11:15:04 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2007-11-04 11:15:04 +0000 |
commit | d4e47d5d649844aa2d29b79334946cf4765c8482 (patch) | |
tree | 68c4ff1afe6390ef876ae427c319c441ea1eceb9 /app/models/enumeration.rb | |
parent | 11cf016c58e9e6e741e8306639940cfdef104564 (diff) | |
download | redmine-d4e47d5d649844aa2d29b79334946cf4765c8482.tar.gz redmine-d4e47d5d649844aa2d29b79334946cf4765c8482.zip |
Added radio buttons on the documents list to sort documents by category, date, title or author.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@879 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/enumeration.rb')
-rw-r--r-- | app/models/enumeration.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb index 744bc1a88..400681a43 100644 --- a/app/models/enumeration.rb +++ b/app/models/enumeration.rb @@ -47,6 +47,10 @@ class Enumeration < ActiveRecord::Base Enumeration.update_all("is_default = #{connection.quoted_false}", {:opt => opt}) if is_default? end + def <=>(enumeration) + position <=> enumeration.position + end + def to_s; name end private |