title: Rails models in subfolders and relationships
body: <p>I organized some of my rails models in folders which I am autoloading with</p>
  
  <pre><code>config.autoload_paths += Dir[Rails.root.join('app', 'models', '{**}')]
  </code></pre>
  
  <p>I can use all models directly(e.g <code>Image.first.file_name</code>) but when I try to access them through relationships, e.g. <code>@housing.images.each do...</code> with <code>has_many: images</code> I get the following error</p>
  
  <pre><code>Unable to autoload constant Housing::HousingImage, expected /path/app/models/housing/image.rb to define it
  </code></pre>
  
  <p>How do i get rails to use my models for the relationship methods?</p>
  
  <p>I'm running ruby 2.2 and rails 4.2</p>