> 1. The same reason that rails core named their classes
> ActiveRecord::Base, not ActiveRecordBase, or
> ActonController::Caching::Actions, not ActionControllerCachingActions,
> etc., is its poor style/design/foresight to use
> CustomerNotesController instead of Customers::NotesController.  We
> should be leveraging the ruby language, not shaping ruby to fit
> rails.  What happens if we have to refactor?  In addition, having to
> configure the routes by hand to use the correct controller name is not
> the rails-way.
>

Reason why it's AR::Base and not ActiveRecordBase is because AR is a
module that has lot more stuff than just the Base class.

Customers::NotesControlle is poor to use instead of NotesController <
CommonController. Or you can just do something like

class NotesController < AC
  include CustomerBehavior
end

Please note that you can have any directory structure you want,
keeping sane controller names. Also, you can have any url you need as
well.

> 2. A lot of the same reasons I wrote in #1.  What about an enterprise-
> level web application with 80 models.  If we prefix them with another
> name anyways, why not make a namespace out of it?
>

My current app has like 40 models so far. 40 more would fit in just perfect.

> 3. So for every module I write, I should have an entry in my
> environment listing each of them so it can load the paths properly?
> Thats rhetorical.
>

No. Just the directory. root/models/customer/

Thanks,
Pratik
-- 
http://m.onkey.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to