From 5d87ca0904eb793084ca81eb56d1a44ed9f1b60e Mon Sep 17 00:00:00 2001 From: Jamie Wilkinson <jamie@tramchase.com> Date: Thu, 16 Sep 2010 09:06:56 +0800 Subject: [PATCH] Use /signup instead of /an_excellent_meme_reference, and don't use hardcoded paths when redirecting --- app/controllers/registrations_controller.rb | 4 ++-- config/routes.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/controllers/registrations_controller.rb b/app/controllers/registrations_controller.rb index d9b68be2a7..8241aa2946 100644 --- a/app/controllers/registrations_controller.rb +++ b/app/controllers/registrations_controller.rb @@ -8,7 +8,7 @@ class RegistrationsController < Devise::RegistrationsController end def create - begin + begin user = User.instantiate!(params[:user]) rescue MongoMapper::DocumentNotValid => e user = nil @@ -20,7 +20,7 @@ class RegistrationsController < Devise::RegistrationsController #redirect_to root_url sign_in_and_redirect(:user, user) else - redirect_to "/get_to_the_choppa" + redirect_to new_user_registration_path end end diff --git a/config/routes.rb b/config/routes.rb index f8de6f95c6..b0ce8bbdfa 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -29,15 +29,15 @@ Diaspora::Application.routes.draw do devise_for :users, :controllers => {:registrations => "registrations"} match 'login', :to => 'devise/sessions#new', :as => "new_user_session" match 'logout', :to => 'devise/sessions#destroy', :as => "destroy_user_session" - match 'get_to_the_choppa', :to => 'registrations#new', :as => "new_user_registration" + match 'signup', :to => 'registrations#new', :as => "new_user_registration" #public routes # match 'webfinger', :to => 'publics#webfinger' match 'hcard/users/:id', :to => 'publics#hcard' - match '.well-known/host-meta',:to => 'publics#host_meta' - match 'receive/users/:id', :to => 'publics#receive' + match '.well-known/host-meta',:to => 'publics#host_meta' + match 'receive/users/:id', :to => 'publics#receive' match 'log', :to => "dev_utilities#log" #root -- GitLab