Reading a file?

this code opens up the csv file


require 'csv'
require 'date'


contents = CSV.open 'event_attendees.csv', headers: true, header_converters: :symbol



contents.each do |row|
  name = row[:first_name] +" "+ row[:last_name]

  regdate = row[:RegDate]

  puts "#{name} registered on #{regdate}"
end

problem is the RegDate thing isn’t being read, heres the output
Allison Nguyen registered on
Sarah …

and heres the CSV file
,RegDate,first_Name,last_Name,Email_Address,…
10:47,Allison,Nguyen,arannon@jumpstartlab.com,… 13:23,SArah,Hankins,pinalevitsky@jumpstartlab.com,…
why is the RegDate not showing?

Thanks…

it worked when I changed the symbol to all lower case


  regdate = row[:regdate]

Why was That?

The convention, in Ruby, for symbols is lower(snake)case.
I am not sure of the background, ‘technical’ reason for that.

ok, thx