diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-29 13:49:09 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2013-12-29 13:49:09 +0000 |
commit | 3ace0292c2e45f38aa1df9e737412c1b7303351a (patch) | |
tree | 84a6190579b6b17e83ef8ab7542446530d96e343 /app/models/changeset.rb | |
parent | 9cefc90b0be4cc14d364d4c4631a6f8b944a6a58 (diff) | |
download | redmine-3ace0292c2e45f38aa1df9e737412c1b7303351a.tar.gz redmine-3ace0292c2e45f38aa1df9e737412c1b7303351a.zip |
Rails4: replace deprecated find_by_id at Changeset class
git-svn-id: http://svn.redmine.org/redmine/trunk@12473 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/changeset.rb')
-rw-r--r-- | app/models/changeset.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/changeset.rb b/app/models/changeset.rb index ff210e9b8..365981124 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -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 |