Reputation: 1711
I have user model with namespace eg: app/models/v1/user.rb
I know if app/models/user.rb we can do
devise_for :user
but with namespace I don't know how to set devise_for that user object (with namespace)
devise_for 'v1/user'
rake routes ok but devise helper not work.
Upvotes: 1
Views: 1567
Reputation: 7034
The devise_for
method supports path
and class_name
options.
You can do something like this:
devise_for :users, path: 'v1/user', class_name: "V1::User"
Upvotes: 2