title: Converting CSV headers to be case insensitive in Ruby
body: <p>I have a ruby import to DB process that checks header titles against an array called headers. As it stands right now, those headers must be typed exactly the same as they appear in the array. I would like for them to be accepted regardless if they are upper or lowercase.</p>
  
  <pre><code>CSV.foreach(FILE, encoding:'iso-8859-1:utf-8', headers: true, skip_blanks: true) do |row| 
  
  # check the header row, make sure all are acceptable
  if count == 0
    row.headers.each do |header|
      if (!headers.include? header) and !header.nil? and header != ""
        log.error "#{header} is not a valid header"
         exit
      end
    end
   end
  </code></pre>
  
  <p>Currently accepts: "Ast_A"
  But does not accept: "ast_a" 
  I have tried code from <a href="https://stackoverflow.com/questions/7980206/convert-hash-keys-to-lowercase-ruby-beginner">Convert hash keys to lowercase -- Ruby Beginner</a> to no avail. My question is how do I make the .csv import header row case insensitive during the import?</p>