mirror of
https://github.com/redmine/redmine.git
synced 2025-11-01 02:46:13 +01:00
* Added links to previous and next revisions on revision view (patch by Cyril Mougel slightly edited)
* Fixed TimelogController#report december error * Fixed ProjectsControllerTest#test_activity 1st and 2nd day of the month failure git-svn-id: http://redmine.rubyforge.org/svn/trunk@938 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -91,4 +91,14 @@ class Changeset < ActiveRecord::Base
|
||||
|
||||
self.issues = referenced_issues.uniq
|
||||
end
|
||||
|
||||
# Returns the previous changeset
|
||||
def previous
|
||||
@previous ||= Changeset.find(:first, :conditions => ['revision < ? AND repository_id = ?', self.revision, self.repository_id], :order => 'revision DESC')
|
||||
end
|
||||
|
||||
# Returns the next changeset
|
||||
def next
|
||||
@next ||= Changeset.find(:first, :conditions => ['revision > ? AND repository_id = ?', self.revision, self.repository_id], :order => 'revision ASC')
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user