Nested Resources

I have a user model that can have one album. Album can have multiple
photos. How do I create nested resources for these three models? How
do you avoid nesting more than two levels?

All the examples I have seen only have nesting with two levels. TIA.

You can nest as deeply as you want.

I have:

map.resources :users do |user|
    user.resource :album do |album|
      album.resources :photos
    end
  end

Should I use the singular resource for my case?Thanks.