I have a yml file of states of the US and Canada. I am loading them
into a State model.
State is defined with a migration
t.column :name, :string
t.column :abbrev :string
In my file states.yml, I have entries of this form
then I have a migration that loads the state information
directory = File.join(File.dirname(__FILE__), "dev_data")
Everything works as expected, until I try to load the data for Ontario
the yml entry is
When I run this, the database entry for the Ontario abbreviation
becomes "1", a string with the character 1
That isn't what I want. I have managed to work around this by using
the abbreviation ONE, and then taking the first two characters with
slice(0,2) whenever I want an abbreviation.
However, that seems like a band-aid.
ON is perhaps a reserved word, or triggering some behavior I don't
Any help or insight would be appreciated.
I would like Ontario to have the two character abbreviation ON