Skip to content

No route matches {:controller=>"devise/home"} #763

Closed
paxos opened this Issue Jan 7, 2011 · 4 comments

2 participants

@paxos
paxos commented Jan 7, 2011

I am using Devise in its very default configuration.

I am not logged in and get redirected to login page (/users/sign_in).

This page uses the default application layout.

Everytime I call an url helper e.g. link_to in the layout the follow error is caused:

No route matches {:controller=>"devise/home"}

What is happening here?

@paxos
paxos commented Jan 7, 2011

This happens only if i specify the parameter in this style:
link_to "Test", :controller => "home", :action => "index"

If i use the helper functions, its working:
link_to "Test", test_url

@josevalim
Plataformatec member

Can you please try asking in the mailing list? Try pasting your routes there as well.

@josevalim
Plataformatec member

Ah, I know why it is happening. It is because it is using the current namespace, which is "devise/". I think if you pass it as :controller => "/home" it would work as expected. Not sure though. It is a rails thing, not Devise.

@paxos
paxos commented Jan 7, 2011

You're absolutely right!

Thanks and sorry, my fault, I was unsure if its a bug or not

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.