I had a similar problem yesterday.

I would go to the root of my site and I would get a Too Many Redirects
message. It seems like there was an infinite loop. After struggling for
over an hour yesterday late at night, it seemed like I fixed it.

But now, when I want to create a New User, it's redirecting me to the
Sign In screen. Seems like I didn't fix the problem completely.

I think Devise is confusing the routes. If I do rake routes, I get
this...


new_user_session GET    /users/sign_in(.:format)
user_session POST   /users/sign_in(.:format)
destroy_user_session DELETE /users/sign_out(.:format)

new_user GET    /users/new(.:format)
edit_user GET    /users/:id/edit(.:format)
user GET    /users/:id(.:format)

This is routes.rb

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

resources :companies
resources :users
resources :companies do
  resources :users
end

I think the routes are getting confused somehow. Because when I click on
Create New User button, it seems me to the Sign in form
(new_user_session, instead of new_user).

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to