diff --git a/app/models/wiki_content.rb b/app/models/wiki_content.rb index c549786ee..3c29f5be7 100644 --- a/app/models/wiki_content.rb +++ b/app/models/wiki_content.rb @@ -118,6 +118,10 @@ class WikiContent < ActiveRecord::Base page.project end + def attachments + page.nil? ? [] : page.attachments + end + # Return true if the content is the current page content def current_version? page.content.version == self.version