I am using Rails 3.2.1.
Is it possible to use different views when using nested resources? i.e. profile/comments post/comments. Let’s say you want both pages to look completely different. Is there a way to do this without overriding render in every controller action?
Preferably I still want to use respond_with.
I didn’t find anything, and in the end I did it the following way:
Every controller that uses nested resources, will extend from NestedController.
Note that the retrieve_parent function has been derived from Ryan’s railscast about polymorphic associations.
Hope this helps someone.