when using nested resources what should follow else in controller create action

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

when using nested resources what should follow else in controller create action

fugee ohu
I'm using nested resources users, addresses so in my routes I have:

resources :users do
  resources :addresses
end
resources :users
resources :adresses

In my controller create action if @address.save succeeds there's a redirect but what should i render if it fails validation? default is render :new i was thinking render 'users/addresses/new' but that fails and it renders /addresses/new

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/a8f6885d-d48c-4ab2-8431-5822bbe51e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.