title: Using ActiveRecord models from lib directory in Rails application
body: <p>How can I access models from a class in lib directory in rails application? I'm currently getting a <code>uninitialized constant ClassName::ModelName</code> when trying to access models. The error occurs when I try to run migrations(I'm transferring a Sinatra app to Rails)</p>
  
  <p>The model is in <code>app/models/parsed_company.rb</code></p>
  
  <pre><code>class ParsedCompany &lt; ActiveRecord::Base
  end
  </code></pre>
  
  <p>The class in lib directory is defined as follows</p>
  
  <pre><code>class DefaultMergeStrategy
    COMPANY_ATTRIBUTES = (ParsedCompany.column_names.map(&amp;:to_sym) - [:created_at, :updated_at])
  end
  </code></pre>