summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
authorGo MAEDA <maeda@farend.jp>2023-08-30 07:30:16 +0000
committerGo MAEDA <maeda@farend.jp>2023-08-30 07:30:16 +0000
commit2415c9f5d780c3b47e5b76cbd6207f361facb026 (patch)
tree1cda872f8602a06bb68cbc932bdccaf9a70159ff /lib/redmine/wiki_formatting
parent937124443caff1675f5719a6bb6b77ec6941648a (diff)
downloadredmine-2415c9f5d780c3b47e5b76cbd6207f361facb026.tar.gz
redmine-2415c9f5d780c3b47e5b76cbd6207f361facb026.zip
Fix exception raised during thumbnail macro to image tag conversion in emails (#38697).
Patch by Y saku and Mizuki ISHIKAWA. git-svn-id: https://svn.redmine.org/redmine/trunk@22285 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/wiki_formatting')
-rw-r--r--lib/redmine/wiki_formatting/macros.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb
index a2acd07eb..cb4976eb7 100644
--- a/lib/redmine/wiki_formatting/macros.rb
+++ b/lib/redmine/wiki_formatting/macros.rb
@@ -281,7 +281,7 @@ module Redmine
container = obj.is_a?(Journal) ? obj.journalized : obj
attachments = container.attachments if container.respond_to?(:attachments)
- if (controller_name == 'previews' || action_name == 'preview') && @attachments.present?
+ if (controller_path == 'previews' || action_name == 'preview') && @attachments.present?
attachments = (attachments.to_a + @attachments).compact
end
if attachments.present? && (attachment = Attachment.latest_attach(attachments, filename))