Rails Devise: How to access sign up page after signed in?

Posted by Junior rails programmer on Stack Overflow See other posts from Stack Overflow or by Junior rails programmer
Published on 2010-12-28T09:59:13Z Indexed on 2010/12/28 16:53 UTC
Read the original article Hit count: 228

hi All,

I am new with rails and i am using "devise" gem for authentication purposes.

At first i add a new user through default sign up page (E.g./users/sign_up)

Then, i made "sign_up" page only available to signed_in users by following instructions from

Devise before filter that prevents access to "new_user_registration_path" unless user is signed-in

Now, after sign in process when i try open sign up page it always directs me to root_path! How can i access sign up page?
My "roots.rb" file as follows:

Example::Application.routes.draw do

  devise_for :users, :controllers => { :registrations => 'registrations'}

  resources :companies

  resources :orders

  resources :customers

  root :to => "welcome#index"

end

Thank you all!

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about user