Commit 742e30d

mo khan <mo@mokhan.ca>
2016-05-31 01:04:36
redirect to profile edit page after registration.
1 parent a42d867
Changed files (2)
app/controllers/registrations_controller.rb
@@ -12,7 +12,7 @@ class RegistrationsController < PublicController
       ).access(request)
       UserMailer.registration_email(@user).deliver_later
       flash[:notice] = translate(".success")
-      redirect_to dashboard_path
+      redirect_to edit_profile_path(@user.username)
     else
       flash.now[:error] = @user.errors.full_messages
       render :new
spec/controllers/registrations_controller_spec.rb
@@ -33,8 +33,8 @@ describe RegistrationsController do
         expect(first_user.email).to eql(email)
       end
 
-      it "redirects them to the dashboard" do
-        expect(response).to redirect_to(dashboard_path)
+      it "redirects them to edit their profile" do
+        expect(response).to redirect_to(edit_profile_path(username))
       end
 
       it "logs them in" do