summaryrefslogtreecommitdiffstats
path: root/app/models/journal.rb
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-07 15:55:03 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-01-07 15:55:03 +0000
commit89b5518e0b3a3b6b40aca2ff1cf29208447f4966 (patch)
tree04a1a8f4a50ee76c7abedaa9cd2f4f191ba39bc2 /app/models/journal.rb
parent52bcc01b3217f46810800b58f8e3c9192209eada (diff)
downloadredmine-89b5518e0b3a3b6b40aca2ff1cf29208447f4966.tar.gz
redmine-89b5518e0b3a3b6b40aca2ff1cf29208447f4966.zip
Rails4: replace deprecated find_all_by_* at Journal model
git-svn-id: http://svn.redmine.org/redmine/trunk@12499 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/journal.rb')
-rw-r--r--app/models/journal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/journal.rb b/app/models/journal.rb
index eb4f9499f..46aa5aa9f 100644
--- a/app/models/journal.rb
+++ b/app/models/journal.rb
@@ -148,7 +148,7 @@ class Journal < ActiveRecord::Base
def self.preload_journals_details_custom_fields(journals)
field_ids = journals.map(&:details).flatten.select {|d| d.property == 'cf'}.map(&:prop_key).uniq
if field_ids.any?
- fields_by_id = CustomField.find_all_by_id(field_ids).inject({}) {|h, f| h[f.id] = f; h}
+ fields_by_id = CustomField.where(:id => field_ids).all.inject({}) {|h, f| h[f.id] = f; h}
journals.each do |journal|
journal.details.each do |detail|
if detail.property == 'cf'