From fcbd06e09069160a31bb70d3514383fea1e2b7f0 2016-11-18 08:41:56 From: Jean-Philippe Lang Date: 2016-11-18 08:41:56 Subject: [PATCH] Allow Journal to return empty Array instead nil in Journal#attachments (#24308). Patch by Roman Shipiev. git-svn-id: http://svn.redmine.org/redmine/trunk@15957 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/app/models/journal.rb b/app/models/journal.rb index c43c4da..3c15d97 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -125,7 +125,7 @@ class Journal < ActiveRecord::Base end def attachments - journalized.respond_to?(:attachments) ? journalized.attachments : nil + journalized.respond_to?(:attachments) ? journalized.attachments : [] end # Returns a string of css classes