Browse Source

Rails4: replace deprecated find_by_id at Changeset class

git-svn-id: http://svn.redmine.org/redmine/trunk@12473 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/2.5.0
Toshi MARUYAMA 10 years ago
parent
commit
3ace0292c2
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      app/models/changeset.rb

+ 1
- 1
app/models/changeset.rb View File

@@ -197,7 +197,7 @@ class Changeset < ActiveRecord::Base
# 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

Loading…
Cancel
Save