Fixed error message display in admin/edit_web - Rails flash handling apparently has changed

This commit is contained in:
Alexey Verkhovsky 2005-05-09 03:41:00 +00:00
parent f1c5004543
commit b3e355f4bc
4 changed files with 12 additions and 10 deletions

View file

@ -36,7 +36,7 @@ class AdminController < ApplicationController
redirect_to :web => @params['address'], :controller => 'wiki', :action => 'new',
:id => 'HomePage'
rescue Instiki::ValidationError => e
flash[:error] = e.message
@error = e.message
# and re-render the form again
end
else
@ -48,6 +48,7 @@ class AdminController < ApplicationController
end
def edit_web
system_password = @params['system_password']
if system_password
# form submitted
@ -68,11 +69,11 @@ class AdminController < ApplicationController
flash[:info] = "Web '#{@params['address']}' was successfully updated"
redirect_home(@params['address'])
rescue Instiki::ValidationError => e
flash[:error] = e.message
@error = e.message
# and re-render the same template again
end
else
flash[:error] = password_error(system_password)
@error = password_error(system_password)
# and re-render the same template again
end
else