summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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 61218d93a..69768c842 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))