Category Archives: mySQL

Was getting an odd error this morning:

SyntaxError in OrganizationsController#show

compile error
vendor/rails/activerecord/lib/active_record/base.rb:1359: syntax error
Object::0

Turned out one of my columns had the name “type”. Not a good thing.

I was about to write a helper for state and country select drop-downs when I found a handy link:

http://27.org/isocountrylist/

2 SQL files – 1 for states and 1 for countries. I imported the script into mySQL with no problems. For RoR, I renamed the country table to countries.