This turned out to be a bug in our code base.  We had the
require_dependency section in environment.rb and not
application_controller.rb.   Not clear to me yet, why it belongs in
application_controller.rb, but that was the instructions per the
original blog post.    The change to Rails 2.3 had some impact on
this.


> Previous to Rails 2.3, we have been placing models in subdirectories
> for organizational purposes, following the suggestions 
> inhttp://m.onkey.org/2007/12/9/namespaced-models, and setting:
>
> <code>  config.load_paths += Dir["#{RAILS_ROOT}/app/models/[a-z]*"]  </
> code>
>
  So we managed to fix both
> with this bit of code (fromhttp://www.ruby-forum.com/topic/124830#633802)
> to get around that issue, placed at the bottom of application.rb
>
> <code>
> model_folders = %w(foos bars bazs)
> for folder in model_folders do
> Dir["#{RAILS_ROOT}/app/models/{folder}/*.rb"].each { |file|
>   require_dependency "{folder}/#{file[file.rindex('/') + 1...-3]}"}
>
> end
> </code>
>

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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