|Have devise_for inside a namespace?||Jeroen||2/23/10 11:47 AM|
I'm trying to have the following routes:
In order to do this i have the following in routes.rb:
namespace :admin do
My model is User. When i have the above code and i run rake routes, i
undefined method `devise_modules' for #<Module:0x00000103488518>
Perhaps this is caused by my model named User instead of Admin?
Is there a way to get this to work?
p.s. The devise_views generator generates the views in the root rails
|Re: [devise] Have devise_for inside a namespace?||José Valim||2/23/10 11:49 AM|
This is for Rails 3? Which Devise version?
Please pastie your Gemfile and config/application.rb.--
Director of Engineering - Plataforma Tecnologia
Know more about us: http://plataformatec.com.br/en/
|Re: Have devise_for inside a namespace?||Jeroen||2/23/10 12:06 PM|
Yep, this is with rails 3 and devise from git:
## Bundle edge rails:
## Bundle the gems you use:
My application.rb is still the default generated one.
On Feb 23, 8:49 pm, José Valim <jose.va...@gmail.com> wrote:
> On Tue, Feb 23, 2010 at 8:47 PM, Jeroen <jeroen.zwartepoo...@gmail.com>wrote:
|Re: [devise] Re: Have devise_for inside a namespace?||José Valim||2/23/10 12:08 PM|
Please post the error backtrace as well!
|Re: Have devise_for inside a namespace?||Jeroen||2/23/10 12:12 PM|
|Re: [devise] Re: Have devise_for inside a namespace?||José Valim||2/23/10 12:16 PM|
Wait. When you do:
It uses Admin. If you are using another model, you have to specify it:
devise_for :admins, :class_name => "User"
This information is in the documentation as well.
On Tue, Feb 23, 2010 at 9:06 PM, Jeroen <jeroen.zw...@gmail.com> wrote:
|Re: Have devise_for inside a namespace?||Jeroen||2/23/10 12:23 PM|
Thanks, you're right. Works ok now. I found the docs @
On Feb 23, 9:16 pm, José Valim <jose.va...@gmail.com> wrote: