generate scaffold under devise user in rails 3.2

167 views
Skip to first unread message

hyperrjas

unread,
Jun 2, 2012, 7:59:18 AM6/2/12
to Devise
I use devise, and I want generate a new object scaffold under devise
user sth like:

resources :users, :path => "/", :only => [:show] do
resources :collections, :controller => 'users/collections'
end

With above routes, I get this url:

http://localhost:3000/kevin_doe/collections

The problem is that if I issue this command:

rails g scaffold users/collection title:string description:text

This generate a namespace sth like:

namespace :users do resources :collections end

The route that I get is:

http://localhost:3000/users/collections

**I want generate a scaffold under devise user resource.**

**How can I fix this problem?**

Thank you!
Reply all
Reply to author
Forward
0 new messages