Merge pull request #763 from ahorek/delete_all_fix

delete_all with args is deprecated
This commit is contained in:
Karel Picman 2017-09-11 17:56:42 +02:00 committed by GitHub
commit 89b18c1df3
3 changed files with 3 additions and 3 deletions

View File

@ -224,7 +224,7 @@ def update_log(repository, changeset, status, message = nil)
end
def delete_log(repository)
Indexinglog.delete_all(:repository_id => repository.id)
Indexinglog.where(:repository_id => repository.id).delete_all
log "Log for repo #{repo_name(repository)} removed!"
end

View File

@ -43,7 +43,7 @@ module RedmineDmsf
DmsfFolder.where(:deleted_by_user_id => id).update_all(:deleted_by_user_id => substitute.id)
DmsfLink.where(:user_id => id).update_all(:user_id => substitute.id)
DmsfLink.where(:deleted_by_user_id => id).update_all(:deleted_by_user_id => substitute.id)
DmsfLock.delete_all(:user_id => id)
DmsfLock.where(:user_id => id).delete_all
DmsfWorkflowStepAction.where(:author_id => id).update_all(:author_id => substitute.id)
DmsfWorkflowStepAssignment.where(:user_id => id).update_all(:user_id => substitute.id)
DmsfWorkflowStep.where(:user_id => id).update_all(:user_id => substitute.id)

View File

@ -88,7 +88,7 @@ class DmsfMaintenance
puts "#{number_to_human_size(size)} has been released\n\n"
# Links
size = DmsfLink.where(:project_id => -1).count
DmsfLink.delete_all(:project_id => -1)
DmsfLink.where(:project_id => -1).delete_all
puts "#{size} links have been deleted.\n\n"
end