title: Circular dependency detected while autoloading constant Message
body: <p>I am using Rails 4.1.</p>
  
  <p>I have a model called <code>Message</code>, then I wrote a customer class <code>HttpMailer::Message</code> located in <code>lib/http_mailer/message.rb</code>.</p>
  
  <p>But after this, every place I refer to my model <code>Message</code> as a constant I will receive an exception <code>Circular dependency detected while autoloading constant Message</code>. To fix it, I have to move <code>http_mailer</code> folder (contains <code>message.rb</code> which defines <code>HttpMailer::Message</code>) into <code>app/models</code>. But I think it should stay in <code>lib</code></p>
  
  <p>Why is that? Where have I done wrong? Or I just should put <code>http_mailer/messsage</code> inside <code>models</code>?</p>
  
  <p>Thanks a lot.</p>