diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/redmine/wiki_formatting/macros.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/redmine/wiki_formatting/macros.rb b/lib/redmine/wiki_formatting/macros.rb index 42096b9a3..9fbed6a6e 100644 --- a/lib/redmine/wiki_formatting/macros.rb +++ b/lib/redmine/wiki_formatting/macros.rb @@ -279,7 +279,8 @@ module Redmine size = size.to_i size = 200 unless size > 0 - attachments = obj.attachments if obj.respond_to?(:attachments) + 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? attachments = (attachments.to_a + @attachments).compact end |