diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-09 03:27:33 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2016-07-09 03:27:33 +0000 |
commit | 027fe7bb6622b3daea09028ca9f06fe094cd3b53 (patch) | |
tree | 169c58378d84e0b5db34003a0184d6f8896fd241 /app/models/wiki_content.rb | |
parent | f416657d563562af639025924834f2960aa54412 (diff) | |
download | redmine-027fe7bb6622b3daea09028ca9f06fe094cd3b53.tar.gz redmine-027fe7bb6622b3daea09028ca9f06fe094cd3b53.zip |
Adds attachments accessor to WikiContent::Version (#23242).
Patch by Jens Kraemer.
git-svn-id: http://svn.redmine.org/redmine/trunk@15610 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki_content.rb')
-rw-r--r-- | app/models/wiki_content.rb | 4 |
1 files changed, 4 insertions, 0 deletions
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 |