I’m working on building an administration (cms) system for websites that
I manage. I’m trying my best to stick to the RESTful concepts, so right
now I have my controllers structured like this:
----news_stories_controller.rb <-- Manage news stories (administration
----news_controller.rb <-- View news stories (public side)
----calendar_events_controller.rb <-- Manage calendar events
----calendar_controller.rb <-- View calendar events (public side)
Note that in my routes.rb I prefix all the “administration system”
controllers with ‘/admin’.
Would it make more sense to re-factor this to use modules (namespaces)
so it would be structured like this?
------news.rb <-- Manage news stories
------calendar.rb <-- Manage calendar events
----news.rb <-- View news stories
----calendar.rb <-- View calendar events
I’ve heard a lot of bad things about modules, but it seems like most of
the problems come down to naming conflicts when you’re dealing with
namespaced models. I much prefer the module approach because it keeps
everything separated and organized…what do you guys think?