From 0c681c7775baba66a4aa6d38e51e5830d86fa39d Mon Sep 17 00:00:00 2001 From: Jacques Distler Date: Sun, 21 Dec 2008 15:41:35 -0600 Subject: [PATCH] Incorrect System Password on Create Web Entering an incorrect password on the Create Web form should redirect back to the form, with a flash error. Fixed. --- app/controllers/admin_controller.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 0d5f600f..ccb3c43f 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -38,8 +38,9 @@ class AdminController < ApplicationController @error = e.message # and re-render the form again end - else - redirect_to :controller => 'wiki', :action => 'index' + else + flash[:error] = "System Password incorrect. Try again." + redirect_to :controller => 'admin', :action => 'create_web' end else # no form submitted -> render template