summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-26 13:05:19 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-02-26 13:05:19 +0000
commitad2036aabaf45703bf74194e204ea76a9033a742 (patch)
treeae83d586eb068e924331fe87ff470d09001b85f9
parent39aa4cac86be56b95bf0a1f9ced8235093268227 (diff)
downloadredmine-ad2036aabaf45703bf74194e204ea76a9033a742.tar.gz
redmine-ad2036aabaf45703bf74194e204ea76a9033a742.zip
Rails 3.1 compatibility (order declared on association takes precedence).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9015 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/models/repository/cvs.rb5
1 files changed, 2 insertions, 3 deletions
diff --git a/app/models/repository/cvs.rb b/app/models/repository/cvs.rb
index bb002d38d..db1f6352c 100644
--- a/app/models/repository/cvs.rb
+++ b/app/models/repository/cvs.rb
@@ -181,10 +181,9 @@ class Repository::Cvs < Repository
end
# Renumber new changesets in chronological order
- changesets.find(
- :all,
+ Changeset.all(
:order => 'committed_on ASC, id ASC',
- :conditions => "revision LIKE 'tmp%'"
+ :conditions => ["repository_id = ? AND revision LIKE 'tmp%'", id]
).each do |changeset|
changeset.update_attribute :revision, next_revision_number
end