Cleanup of finders with :conditions option.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11963 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -68,15 +68,11 @@ class Repository::Bazaar < Repository
|
||||
full_path = File.join(root_url, e.path)
|
||||
e.size = File.stat(full_path).size if File.file?(full_path)
|
||||
end
|
||||
c = Change.find(
|
||||
:first,
|
||||
:include => :changeset,
|
||||
:conditions => [
|
||||
"#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?",
|
||||
e.lastrev.revision,
|
||||
id
|
||||
],
|
||||
:order => "#{Changeset.table_name}.revision DESC")
|
||||
c = Change.
|
||||
includes(:changeset).
|
||||
where("#{Change.table_name}.revision = ? and #{Changeset.table_name}.repository_id = ?", e.lastrev.revision, id).
|
||||
order("#{Changeset.table_name}.revision DESC").
|
||||
first
|
||||
if c
|
||||
e.lastrev.identifier = c.changeset.revision
|
||||
e.lastrev.name = c.changeset.revision
|
||||
|
||||
Reference in New Issue
Block a user