]> source.dussan.org Git - redmine.git/commitdiff
Merged r4712 from trunk.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 14 Jan 2011 23:37:10 +0000 (23:37 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 14 Jan 2011 23:37:10 +0000 (23:37 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.1-stable@4715 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/repository.rb

index 89360393d5d517901c2d991d62a4afff90705fb6..19458de87952506ac77c1c6c9593e5b9f62e36e2 100644 (file)
@@ -91,13 +91,13 @@ class Repository < ActiveRecord::Base
   def relative_path(path)
     path
   end
-  
+
   # Finds and returns a revision with a number or the beginning of a hash
   def find_changeset_by_name(name)
-    return nil if name.nil? || name.empty?
+    return nil if name.blank?
     changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%']))
   end
-  
+
   def latest_changeset
     @latest_changeset ||= changesets.find(:first)
   end