diff app/models/changeset.rb @ 1517:dffacf8a6908 redmine-2.5

Update to Redmine SVN revision 13367 on 2.5-stable branch
author Chris Cannam
date Tue, 09 Sep 2014 09:29:00 +0100
parents e248c7af89ec
children fb9a13467253
line wrap: on
line diff
--- a/app/models/changeset.rb	Tue Sep 09 09:28:31 2014 +0100
+++ b/app/models/changeset.rb	Tue Sep 09 09:29:00 2014 +0100
@@ -198,7 +198,7 @@
   # Finds an issue that can be referenced by the commit message
   def find_referenced_issue_by_id(id)
     return nil if id.blank?
-    issue = Issue.find_by_id(id.to_i, :include => :project)
+    issue = Issue.includes(:project).where(:id => id.to_i).first
     if Setting.commit_cross_project_ref?
       # all issues can be referenced/fixed
     elsif issue