On Fri, May 27, 2011 at 8:00 PM, egervari <ken.egerv...@gmail.com> wrote:
> Oh, I also want to add that Admins will manage Users too, not just > Companies and Themes. So there is a conflict where Companies can > create/edit/delete Users and use/not use the same controller. There is > also potential route conflicts unless you use nested resources. > > I also want to add that Admins can do some things to users, but > Company users can do other things. It's not just a subset - but the > views and actions and forms will be somewhat different. > > That is why I am having difficulty figuring out the routes, what the > controllers should be, and what to generalize and what to keep > separate. > That is a challenge and there is no right answer, only what is cleaner. What is nice about the namespacing way of going is that you have a more clear delineation as far as rights for the admin. It might mean you dup some code between the controllers. But that is certainly cleaner than having special cases in a single controller that sooner or later could become problematic. > > -- > 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-talk@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. > > -- 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-talk@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.