I have numerous models in my app/models folder. I\'d like to clean this folder up a little bit. Move models that belong to each other in subfolders. The problem is that by c
We needed to do this, and there is a very simple way.
move your models into the sub-folders, and then tell rails to load files from all subfolders in your environment.rb file:
config.load_paths += Dir["#{RAILS_ROOT}/app/models/*"].find_all { |f| File.stat(f).directory? }
No namespacing required, and the models can be referred to as normal in your app