end
def preview
- issue = @project.issues.find_by_id(params[:id])
- @attachements = issue.attachments if issue
+ @issue = @project.issues.find_by_id(params[:id]) if params[:id]
+ @attachements = issue.attachments if @issue
@text = params[:notes] || (params[:issue] ? params[:issue][:description] : nil)
render :partial => 'common/preview'
end
</div>
<%= submit_tag l(:button_create) %>
<%= link_to_remote l(:label_preview),
- { :url => { :controller => 'issues', :action => 'preview', :project_id => @project, :id => @issue },
+ { :url => { :controller => 'issues', :action => 'preview', :project_id => @project },
:method => 'post',
:update => 'preview',
:with => "Form.serialize('issue-form')",