@@ -91,13 +91,13 class Repository < ActiveRecord::Base | |||
|
91 | 91 | def relative_path(path) |
|
92 | 92 | path |
|
93 | 93 | end |
|
94 | ||
|
94 | ||
|
95 | 95 | # Finds and returns a revision with a number or the beginning of a hash |
|
96 | 96 | def find_changeset_by_name(name) |
|
97 |
return nil if name. |
|
|
97 | return nil if name.blank? | |
|
98 | 98 | changesets.find(:first, :conditions => (name.match(/^\d*$/) ? ["revision = ?", name.to_s] : ["revision LIKE ?", name + '%'])) |
|
99 | 99 | end |
|
100 | ||
|
100 | ||
|
101 | 101 | def latest_changeset |
|
102 | 102 | @latest_changeset ||= changesets.find(:first) |
|
103 | 103 | end |
General Comments 0
You need to be logged in to leave comments.
Login now