diff options
author | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 14:11:03 +0000 |
---|---|---|
committer | Toshi MARUYAMA <marutosijp2@yahoo.co.jp> | 2014-01-07 14:11:03 +0000 |
commit | f8df0e729c5c2b6d2579405fa4e689d0cebafebc (patch) | |
tree | 5371f0115ce0b4f3127faea6baf36fbc3a8130a1 /app/helpers | |
parent | a8c8266b9d9a9672bc3513e51094f772c9f57b5a (diff) | |
download | redmine-f8df0e729c5c2b6d2579405fa4e689d0cebafebc.tar.gz redmine-f8df0e729c5c2b6d2579405fa4e689d0cebafebc.zip |
Rails4: deprecated find_by methods with options at ApplicationHelper
git-svn-id: http://svn.redmine.org/redmine/trunk@12491 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/application_helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index bb7208e36..cf7c11740 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -759,7 +759,8 @@ module ApplicationHelper oid = identifier.to_i case prefix when nil - if oid.to_s == identifier && issue = Issue.visible.find_by_id(oid, :include => :status) + if oid.to_s == identifier && + issue = Issue.visible.includes(:status).find_by_id(oid) anchor = comment_id ? "note-#{comment_id}" : nil link = link_to(h("##{oid}#{comment_suffix}"), {:only_path => only_path, :controller => 'issues', :action => 'show', :id => oid, :anchor => anchor}, :class => issue.css_classes, @@ -776,7 +777,7 @@ module ApplicationHelper :class => 'version' end when 'message' - if message = Message.visible.find_by_id(oid, :include => :parent) + if message = Message.visible.includes(:parent).find_by_id(oid) link = link_to_message(message, {:only_path => only_path}, :class => 'message') end when 'forum' |