title: Rails engine concerns autoload paths
body: <p>I have some rails engine 'Core', and I have:</p>
  
  <pre><code># core/app/models/core/concerns/user_helper.rb
  module Core
   module UserHelper
    extend ActiveSupport::Concern
    included do
    # some methods
    end
   end
  end
  
  # core/app/models/core/user.rb
  module Core
   class User &lt; ActiveRecord::Base
    include Core::UserHelper
   end
  end
  </code></pre>
  
  <p>however it says <strong>uninitialized constant Core::UserHelper</strong>. So it seems engine doesn't load its concerns by default, so I added it in the autoload paths</p>
  
  <pre><code>module Core
    class Engine &lt; ::Rails::Engine
      config.autoload_paths += %W(#{Core::Engine.root}/app/models/core/concerns)
      isolate_namespace Core
    end
  end
  </code></pre>
  
  <p>And now I end up this error: <strong>Unable to autoload constant UserHelper, expected myapp/core/app/models/core/concerns/user_helper.rb to define it</strong></p>
  
  <p>So what is wrong here? When I checked the guide <a href="http://edgeguides.rubyonrails.org/engines.html" rel="noreferrer">http://edgeguides.rubyonrails.org/engines.html</a> and it didn't have the concerns in concerns directory, but rather under lib/concerns and had all reference to concern using Core::Concerns::MyConcern, so is this where to put concerns in engine?</p>
  
  <p>Thanks</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Yury comment explained the issue, it seems that in rails engines concerns directory don't get any special treatment, and it is treated as a normal directory under models, so modules in it must be within Concerns namespace, and when including a concern, you have to include it with Concerns namesapace as well, if I understand right. I 'm surprised this is not mentioned in the docs.</p>