@@ -101,7 +101,7 class Repository < ActiveRecord::Base | |||||
101 |
|
101 | |||
102 | # Finds and returns a revision with a number or the beginning of a hash |
|
102 | # Finds and returns a revision with a number or the beginning of a hash | |
103 | def find_changeset_by_name(name) |
|
103 | def find_changeset_by_name(name) | |
104 |
return nil if name. |
|
104 | return nil if name.blank? | |
105 | changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%'])) |
|
105 | changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%'])) | |
106 | end |
|
106 | end | |
107 |
|
107 |
General Comments 0
You need to be logged in to leave comments.
Login now