From: martyntaylor <[email protected]>

---
 src/app/controllers/users_controller.rb |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/app/controllers/users_controller.rb 
b/src/app/controllers/users_controller.rb
index 8ab16e3..9bd037c 100644
--- a/src/app/controllers/users_controller.rb
+++ b/src/app/controllers/users_controller.rb
@@ -33,8 +33,13 @@ class UsersController < ApplicationController
 
     @registration = RegistrationService.new(@user)
     if @registration.save
-      flash[:notice] = "User registered!"
-      redirect_to users_path
+      if @current_user
+        flash[:notice] = "User registered!"
+        redirect_to users_path
+      else
+        flash[:notice] = "You have successfully registered!"
+        redirect_to :dashboard
+      end
     else
       flash[:warning] = "user registration failed: #[email protected]}"
       render :action => :new
-- 
1.7.2.3

_______________________________________________
deltacloud-devel mailing list
[email protected]
https://fedorahosted.org/mailman/listinfo/deltacloud-devel

Reply via email to