##// END OF EJS Templates
Fixed: trying to preview a new issue raises an exception with postgresql (close #984)....
Jean-Philippe Lang -
r1307:7f0aa5611948
parent child
Show More
@@ -344,8 +344,8 class IssuesController < ApplicationController
344 end
344 end
345
345
346 def preview
346 def preview
347 issue = @project.issues.find_by_id(params[:id])
347 @issue = @project.issues.find_by_id(params[:id]) if params[:id]
348 @attachements = issue.attachments if issue
348 @attachements = issue.attachments if @issue
349 @text = params[:notes] || (params[:issue] ? params[:issue][:description] : nil)
349 @text = params[:notes] || (params[:issue] ? params[:issue][:description] : nil)
350 render :partial => 'common/preview'
350 render :partial => 'common/preview'
351 end
351 end
@@ -8,7 +8,7
8 </div>
8 </div>
9 <%= submit_tag l(:button_create) %>
9 <%= submit_tag l(:button_create) %>
10 <%= link_to_remote l(:label_preview),
10 <%= link_to_remote l(:label_preview),
11 { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue },
11 { :url => { :controller => 'issues', :action => 'preview', :project_id => @project },
12 :method => 'post',
12 :method => 'post',
13 :update => 'preview',
13 :update => 'preview',
14 :with => "Form.serialize('issue-form')",
14 :with => "Form.serialize('issue-form')",
General Comments 0
You need to be logged in to leave comments. Login now