diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-10 20:09:41 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-10 20:09:41 +0000 |
commit | ef25210aca9278e51f81bd15e85a3143c667ff17 (patch) | |
tree | 312d20360571770a231f4fd307c12d0c535d60f2 /app/controllers/previews_controller.rb | |
parent | 2304f5d42c2bb1829b1cf9055c2848db116742d3 (diff) | |
download | redmine-ef25210aca9278e51f81bd15e85a3143c667ff17.tar.gz redmine-ef25210aca9278e51f81bd15e85a3143c667ff17.zip |
Merged ajax_upload branch (#3957).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10977 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, 1 insertions, 3 deletions
diff --git a/app/controllers/previews_controller.rb b/app/controllers/previews_controller.rb index 9594a9fe1..4ea945c64 100644 --- a/app/controllers/previews_controller.rb +++ b/app/controllers/previews_controller.rb @@ -16,12 +16,11 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class PreviewsController < ApplicationController - before_filter :find_project + before_filter :find_project, :find_attachments def issue @issue = @project.issues.find_by_id(params[:id]) unless params[:id].blank? if @issue - @attachements = @issue.attachments @description = params[:issue] && params[:issue][:description] if @description && @description.gsub(/(\r?\n|\n\r?)/, "\n") == @issue.description.to_s.gsub(/(\r?\n|\n\r?)/, "\n") @description = nil @@ -37,7 +36,6 @@ class PreviewsController < ApplicationController 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' |