added pagination on revisions list
git-svn-id: http://redmine.rubyforge.org/svn/trunk@381 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -36,6 +36,15 @@ class Repository < ActiveRecord::Base
|
||||
super if root_url.blank?
|
||||
end
|
||||
|
||||
def changesets_with_path(path="")
|
||||
path = "/#{path}%"
|
||||
path = url.gsub(/^#{root_url}/, '') + path if root_url && root_url != url
|
||||
path.squeeze!("/")
|
||||
Changeset.with_scope(:find => { :include => :changes, :conditions => ["#{Change.table_name}.path LIKE ?", path] }) do
|
||||
yield
|
||||
end
|
||||
end
|
||||
|
||||
def changesets_for_path(path="")
|
||||
path = "/#{path}%"
|
||||
path = url.gsub(/^#{root_url}/, '') + path if root_url && root_url != url
|
||||
|
||||
Reference in New Issue
Block a user