How do I customize the user registration route with the devise gem for Rails?

Here is what I was able to do with the Devise routes to customize all of them.

Up vote 2 down vote favorite 2 share g+ share fb share tw.

I use the Devise gem with Rails and would like to alter the action that occurs during user registration. My faulty customization looks like this: devise_for :users, :controllers => { :registrations => "users/registrations" } do post "/", :to => "users/registrations#create_from_admin" end Resulting in this: bbrasky@admins-MacBook-Pro-2:~/Projects/my_app(master)$ rake routes POST /users(.:format) {:controller=>"users/registrations", :action=>"create"} Does anyone know how to do this? Thanks!

Ruby-on-rails devise link|improve this question asked Aug 30 '10 at 17:42Bill Brasky8719 67% accept rate.

Here is what I was able to do with the Devise routes to customize all of them devise_for :users, :as => "", :path_names => { :sign_in => "login", :sign_out => "logout", :sign_up => "register" } match "login" => "devise/sessions#new", :as => :new_user_session match "logout" => "devise/sessions#destroy", :as => :destroy_user_session match "register" => "devise/registrations#new", :as => :new_user_registration If you run rake routes you will see the rest that you could modify but this is the start of the list and they all work correctly :) Have fun!

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions