How to generate the proper `url_for` a nested resource?
问题 I am using Ruby on Rails 3.2.2 and I would like to generate a proper url_for URL for a nested resource. That is, I have: # config/routes.rb resources :articles do resources :user_associations end # app/models/article.rb class Article < ActiveRecord::Base ... end # app/models/articles/user_association.rb class Articles::UserAssociation < ActiveRecord::Base ... end Note : generated named routes are like article_user_associations , article_user_association , edit_article_user_association , ...