plataformatec/devise — Issue #1612: Wrong redirect path for sign up when overriding RegistrationsController
Author: Retistic
Created: 2012-01-30 23:41:13+00:00
State: open

'respond_with resource' on line 27 in the [RegistrationsController](https://github.com/plataformatec/devise/blob/master/app/controllers/devise/registrations_controller.rb) is redirecting to the old devise view when the signup form is supplied invalid parameters. This is only the case when i copy the create action to my own RegistrationsController. The correct view renders on /signup but not when redirected to /signup with errors.

Here is my routes file:
```ruby
MyApp::Application.routes.draw do
devise_for :users, :controllers => { :sessions => "sessions", :registrations => "registrations" }, :skip => [ :sessions, :registations ] do

get '/signin' => 'sessions#new', :as => :new_user_session
post '/signin' => 'sessions#create', :as => :user_session
delete '/signout' => 'sessions#destroy', :as => :destroy_user_session

get '/signup' => 'registrations#new', :as => :new_user_registration
post '/signup' => 'registrations#create', :as => :user_registration
get '/users/cancel' => 'registrations#cancel', :as => :cancel_user_registration
get '/settings'	=> 'registrations#edit', :as => :edit_user_registration
put '/account' => 'registrations#update'
delete '/users' => 'registrations#destroy'
end

match '/home' => "pages#home", :as => :user_root

resources :users

match '/home', :to => 'pages#home'
match '/welcome', :to => 'pages#welcome'

root :to => 'pages#welcome'
end
```

My registrations file only has the copied create action in it. Am I missing a step or do I need to change respond_with to something else when overriding the controller?