Browse Source

Fixes Repository#find_changeset_by_name with PostgreSQL (#3937).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2903 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/0.9.0
Jean-Philippe Lang 14 years ago
parent
commit
4e811bebd1
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/models/repository.rb

+ 1
- 1
app/models/repository.rb View File

@@ -94,7 +94,7 @@ class Repository < ActiveRecord::Base
# Finds and returns a revision with a number or the beginning of a hash
def find_changeset_by_name(name)
changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_i] : ["revision LIKE ?", name + '%']))
changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%']))
end
def latest_changeset

Loading…
Cancel
Save