title: Rails 4 engine nested module not being included with uninitialized constant (NameError)
body: <p>I have a nested module set up as a base helper method which is not getting included in the app that uses the engine.</p>
  
  <p>in lib/mol/blog/blog.rb</p>
  
  <pre><code>require "mol/blog/engine"
  
  module Mol
    module Blog
      module Categories
        def self.included(base)
          base.helper_method :categories
        end
  
        def categories
          Mol::Cms::Category.all
        end
      end
    end
  end
  </code></pre>
  
  <p>In the engine's spec/dummy application_controller</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery
    include Mol::Blog::Categories
  end
  </code></pre>
  
  <p>This works fine and the categories appear as expected. However, when I try to use the engine in a different app, the Categories module is not being included.</p>
  
  <p>in the app's application controller</p>
  
  <pre><code>class ApplicationController &lt; ActionController::Base
    protect_from_forgery with: :exception
  
    include Mol::Blog::Categories
  end
  </code></pre>
  
  <p>In the rails console, the error is <code>uninitialized constant Mol::Blog::Category (NameError)</code></p>
  
  <p><code>Mol::Blog</code> is defined, no error or anything. Why is the Categories module not being recognised?</p>