title: ActiveRecord query using multiple conditions
body: <p>I have a employee data base that captures all employees for all companies the companies are referenced by a <code>company_id</code></p>
  
  <p>I want to do something like this</p>
  
  <pre><code>sql = "SELECT race, `foreign`, id_number, company_id, COUNT(*) FROM `employees` WHERE company_id = 52 AND race = `African` AND `foreign` = 1 GROUP BY id_number;"
  temp_arr = []
  ActiveRecord::Base.connection.execute(sql).each {|int| temp_arr &lt;&lt; int }
  </code></pre>
  
  <p>Like this</p>
  
  <pre><code>employee_ids = Employees.where(company_id: company_id and race: 'African' and foreign: 1).pluck(:id_number)
  </code></pre>
  
  <p>I keep getting the following error</p>
  
  <pre><code>ActiveRecord::StatementInvalid: Mysql2::Error: Unknown column 'African' in 'where clause':
  </code></pre>
  
  <p>And have been reading the <a href="http://guides.rubyonrails.org/active_record_querying.html" rel="nofollow" >Ruby on Rails Guides</a> and cant seem to find what i am looking for. sorry i have never done such a query before its probably formatted wrong or something</p>