I'm certain this is a stupid mistake but I can't find it.
Can someone tell me why this code is giving me errors?
The errors are at the botttom of the paste.
Thanks for any help.
I'm certain this is a stupid mistake but I can't find it.
Can someone tell me why this code is giving me errors?
The errors are at the botttom of the paste.
Thanks for any help.
at line 10 - 11, is not hash type. Here is your correction :
results.each_hash do |row|
if row["start_time"].nil? row["start_time"] = "09:00:00" end
if row["end_time"].nil? row["end_time"] = "17:00:00" end
event = { :title=>row["title"], :startTime=>row["start_time"], :endTime=>row["end_time"]}
puts "Title of event #{row["start_time"]}
end
Good Luck, reinhart
Http://teapoci.blogspot.com "Object Oriented Antioxide"
Thanks for everyone help with this.
I see what you mean now, the corrections worked.
There was no earthly reason why the replacement needed to be in the hash definition and moving it outside it makes perfect sense and works.
Thanks everyone
Hi --