NACK It applies cleanly and works well. Unfortunately, it breaks one rspec test:
'UsersController#create user enters valid input should create user' FAILED expected redirect to "http://test.host/users", got redirect to "http://test.host/dashboard" ./spec/controllers/users_controller_spec.rb:50: On 10/14/2010 02:47 PM, [email protected] wrote: > 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 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
