render edit on unsuccessful update

pull/6827/head
Martin Linkhorst 11 years ago
parent eabeaca549
commit 9bd026745b
  1. 2
      app/controllers/documents_controller.rb

@ -66,6 +66,8 @@ class DocumentsController < ApplicationController
if @document.save if @document.save
flash[:notice] = l(:notice_successful_update) flash[:notice] = l(:notice_successful_update)
redirect_to :action => 'show', :id => @document redirect_to :action => 'show', :id => @document
else
render :action => 'edit'
end end
end end

Loading…
Cancel
Save