diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-02 16:47:53 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-08-02 16:47:53 +0000 |
commit | 2275f46138758c2cf10511901a59c555e14a046f (patch) | |
tree | 91e49181fc9ce34482d1b7e845ee56f999701959 /app | |
parent | 34cdac166949e5b88b3df36e5125fe4688339d18 (diff) | |
download | redmine-2275f46138758c2cf10511901a59c555e14a046f.tar.gz redmine-2275f46138758c2cf10511901a59c555e14a046f.zip |
Makes Version#<=> consistent with SQL sort.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10152 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r-- | app/models/version.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/version.rb b/app/models/version.rb index 0ea1c3c71..6a7dae6a6 100644 --- a/app/models/version.rb +++ b/app/models/version.rb @@ -168,7 +168,7 @@ class Version < ActiveRecord::Base if self.effective_date if version.effective_date if self.effective_date == version.effective_date - "#{self.project.name} - #{self.name}" <=> "#{version.project.name} - #{version.name}" + name == version.name ? id <=> version.id : name <=> version.name else self.effective_date <=> version.effective_date end @@ -179,7 +179,7 @@ class Version < ActiveRecord::Base if version.effective_date 1 else - "#{self.project.name} - #{self.name}" <=> "#{version.project.name} - #{version.name}" + name == version.name ? id <=> version.id : name <=> version.name end end end |