I''m working on a new Rails (v3.0.0.rc) application using the Devise (v1.1.1) gem. In my application I have setup a User model which includes the person''s e-mail address and name. I have also setup the following models that I''d like to attach to the User: - Address (street, city, state, zip code) - Interest (name) - Donation (date of donation, amount) My question is how can I go about setting up routing for these nested resources? When reading the documentation for Rails 3 routing I saw the that the following was possible: resources :users do resource :address resources :interests, :donations end Although when using devise, the `devise_for :users` helper doesn''t appear to accept a block of nested resources. Does anyone have any ideas on what I can do to setup this behavior (or propose alternative ideas on what I could do). Any help would be greatly appreciated, thanks! -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I just happened to be looking for the same information. I found it here: http://www.michaelharrison.ws/weblog/?p=349 To quote the relevant part: The solution is to give devise_for an alternate path to use for user authentication, e.g. accounts: devise_for :users, :path => ''accounts'' resources :users do resources :someresources end It doesn’t matter what path you use, since devise is going to use its own controller to handle authentication requests. -- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Thanks, this is just what I was looking for. On Fri, Aug 27, 2010 at 6:17 PM, Errol Siegel <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> I just happened to be looking for the same information. I found it > here: > > http://www.michaelharrison.ws/weblog/?p=349 > > To quote the relevant part: > > The solution is to give devise_for an alternate path to use for user > authentication, e.g. accounts: > > devise_for :users, :path => ''accounts'' > > resources :users do > resources :someresources > end > > > It doesn’t matter what path you use, since devise is going to use its > own controller to handle authentication requests. > -- > 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.