@@ -150,12 +150,18 class Changeset < ActiveRecord::Base | |||
|
150 | 150 | |
|
151 | 151 | # Returns the previous changeset |
|
152 | 152 | def previous |
|
153 | @previous ||= Changeset.find(:first, :conditions => ['id < ? AND repository_id = ?', self.id, self.repository_id], :order => 'id DESC') | |
|
153 | @previous ||= Changeset.find(:first, | |
|
154 | :conditions => ['id < ? AND repository_id = ?', | |
|
155 | self.id, self.repository_id], | |
|
156 | :order => 'id DESC') | |
|
154 | 157 | end |
|
155 | 158 | |
|
156 | 159 | # Returns the next changeset |
|
157 | 160 | def next |
|
158 | @next ||= Changeset.find(:first, :conditions => ['id > ? AND repository_id = ?', self.id, self.repository_id], :order => 'id ASC') | |
|
161 | @next ||= Changeset.find(:first, | |
|
162 | :conditions => ['id > ? AND repository_id = ?', | |
|
163 | self.id, self.repository_id], | |
|
164 | :order => 'id ASC') | |
|
159 | 165 | end |
|
160 | 166 | |
|
161 | 167 | # Creates a new Change from it's common parameters |
General Comments 0
You need to be logged in to leave comments.
Login now