summaryrefslogtreecommitdiffstats
path: root/lib/redmine/wiki_formatting/macros.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/redmine/wiki_formatting/macros.rb')
-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 be398c5a6..9d9b1c2d0 100644
--- a/lib/redmine/wiki_formatting/macros.rb
+++ b/lib/redmine/wiki_formatting/macros.rb
@@ -280,7 +280,7 @@ module Redmine
size = 200 unless size > 0
attachments = obj.attachments if obj.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))