seamusabshere / data_miner

Download, unpack from a ZIP/TAR/GZ/BZ2 archive, parse, correct, convert units and import Google Spreadsheets, XLS, ODS, XML, CSV, HTML, etc. into your ActiveRecord models. Uses RemoteTable gem internally.
MIT License
302 stars 21 forks source link

shouldn't depend on HashWithIndifferentAccess #5

Closed seamusabshere closed 12 years ago

seamusabshere commented 15 years ago

hashes are used with both symbol and string keys, made possible by ActiveSupport's HashWithIndifferentAccess.

unfortunately this results in subtle gotchas like

>> hsh = HashWithIndifferentAccess.new({ :a => 1})
=> {"a"=>1}
>> hsh.has_key?(:a)
=> true
>> hsh.keys.include?(:a)
=> false
seamusabshere commented 12 years ago

not an issue any more - rows always have string keys (has been this way for years)