Multiple Nested RESTful Resources

I have a domain model with 3 resources: Surveys, Questions, Choices.
(Surveys have_many Questions; Questions have_many Choices. Questions
belong_to Survey; Choices belong_to Question)

Here is how I've set up the routes:

If Survey has_many Questions, then you probably don’t have a @question variable in the Survey#show action, unless there is a default Question or I’m just misunderstanding something. Have you set @question? If not, then that’s your error.

It seems like the following bit should go in your _question.rhtml partial, not the show.rhtml:

<% unless @question.choices(params[@survey]).empty? %>
<%= render :partial => “/choices/choice/”, :collection => @
question.choices %>
<% end %>

and I believe you’ll need to use question instead of @question if inside a collection partial.