summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting
diff options
context:
space:
mode:
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))