diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-16 14:18:43 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-09-16 14:18:43 +0000 |
commit | ca4f2c59b6479ad088aa87e6173bcdd5c7c66629 (patch) | |
tree | f3ccfc188a24479cb036057315553a2787ce21a5 /app/controllers/previews_controller.rb | |
parent | 2058c66d734c586ef175c6d2f468bbfeae77e5b8 (diff) | |
download | redmine-ca4f2c59b6479ad088aa87e6173bcdd5c7c66629.tar.gz redmine-ca4f2c59b6479ad088aa87e6173bcdd5c7c66629.zip |
Attachments should be available to the text formatter when previewing an existing news.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10400 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/controllers/previews_controller.rb')
-rw-r--r-- | app/controllers/previews_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/previews_controller.rb b/app/controllers/previews_controller.rb index 6960dfff5..cd947148d 100644 --- a/app/controllers/previews_controller.rb +++ b/app/controllers/previews_controller.rb @@ -34,6 +34,10 @@ class PreviewsController < ApplicationController end def news + if params[:id].present? && news = News.visible.find_by_id(params[:id]) + @previewed = news + @attachments = news.attachments + end @text = (params[:news] ? params[:news][:description] : nil) render :partial => 'common/preview' end |