diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-03 13:16:51 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2008-04-03 13:16:51 +0000 |
commit | 7f0aa5611948ebed0c1eaf4c3218762fb50e199e (patch) | |
tree | e01048715fa78c42a15d12ec7461e73948f94230 | |
parent | 6348eeaf8a5124dfd7793211d673bb928f1ea64b (diff) | |
download | redmine-7f0aa5611948ebed0c1eaf4c3218762fb50e199e.tar.gz redmine-7f0aa5611948ebed0c1eaf4c3218762fb50e199e.zip |
Fixed: trying to preview a new issue raises an exception with postgresql (close #984).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1322 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/issues_controller.rb | 4 | ||||
-rw-r--r-- | app/views/issues/new.rhtml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/issues_controller.rb b/app/controllers/issues_controller.rb index 269e988d9..b3f21fddf 100644 --- a/app/controllers/issues_controller.rb +++ b/app/controllers/issues_controller.rb @@ -344,8 +344,8 @@ class IssuesController < ApplicationController 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 diff --git a/app/views/issues/new.rhtml b/app/views/issues/new.rhtml index 7b9dde899..280e2009b 100644 --- a/app/views/issues/new.rhtml +++ b/app/views/issues/new.rhtml @@ -8,7 +8,7 @@ </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')", |