Most in the Rails community seem stick with 1 controller per resource when using RESTfull routes. This makes sense for a resource with one scope and one view, but once a resource is used with multiple scopes and/or views the amount of code duplication needed to manage these in a single controller can balloon quick. Yet despite the impending chaos, it seems as though people prefer to maintain a controller per resource.
Take these examples from Rails sites written by well respected authors: 1. http://tinyurl.com/2d9rl3v find_container() and find_events(): why would one want to do this? This can become unmanageable. If each of these scopes require different view components the same checks will have to be done in the action's view or when determining the layout. 2. http://tinyurl.com/2679ye3 Look at how many times wall? and blog? have to be called. Not very DRY if you ask me. Rail's routing gives you these checks for free, why not create a WallCommentsController and BlogCommentsController? If differing views are involved for each of these it seems like a no brainer... but it's never done. Why? What am I missing? -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.