Commit 6d6a3fc

mo khan <mo@mokhan.ca>
2017-02-12 18:25:12
use redirect instead of render to fix url.
1 parent d10e502
app/controllers/registrations_controller.rb
@@ -16,8 +16,8 @@ class RegistrationsController < PublicController
       flash[:notice] = translate(".success")
       redirect_to edit_profile_path(@user.username)
     else
-      flash.now[:error] = @user.errors.full_messages
-      render :new
+      flash[:error] = @user.errors.full_messages
+      redirect_to new_registration_path
     end
   end
 
spec/controllers/registrations_controller_spec.rb
@@ -81,7 +81,7 @@ describe RegistrationsController do
       end
 
       it "renders the registration page" do
-        expect(response).to render_template(:new)
+        expect(response).to redirect_to(new_registration_path)
       end
     end
   end
spec/spec_helper.rb
@@ -11,7 +11,4 @@ RSpec.configure do |config|
   config.run_all_when_everything_filtered = true
   config.order = :random
   Kernel.srand config.seed
-  config.backtrace_exclusion_patterns = [
-    /usr\/local/
-  ]
 end