title: How to force Rails ActiveRecord to use CamelCase in queries, instead of snake_case
body: <p>I am trying to create a rails app that will connect to a production SQLServer that is used by 3rd party software, so migrating the database is not an option.</p>
  <p>I am able to connect to the SQL server without any issues (<a href="https://codeburst.io/how-to-build-a-rails-app-on-top-of-an-existing-database-baa3fe6384a0" rel="nofollow noreferrer">I used this guide for connecting to existing database</a>, and <a href="https://docs.microsoft.com/en-us/sql/connect/ruby/step-1-configure-development-environment-for-ruby-development?view=sql-server-ver15" rel="nofollow noreferrer">this one to connect rails to SQL Server</a>), and I can query tables that use snake_case names.</p>
  <p>The tables I need to access are in CameCase and I am not able to rename it because the 3rd party software will stop working.</p>
  <p>I've already implemented <strong>/config/environment.rb</strong></p>
  <p><code>ActiveRecord::Base.pluralize_table_names = false</code>
  to remove pluralization.</p>
  <p>For example:</p>
  <pre><code>UserTable.count
  </code></pre>
  <p>ActiveRecord creates this: <code>*SELECT COUNT(*) FROM [user_table]*</code></p>
  <p><strong>I want ActiveRecord to create this: <code>SELECT COUNT(*) FROM [UserTable]</code></strong></p>
  <p>What file do I modify to specify the correct table name it should use?</p>