I am currently working on a rails project and have a requirement where I want to be able to map a country name's initial letters to its ISD code. eg: IND => 91, USA => 1, etc.
The broader question here being (notwithstanding which framework you work on), what should be the best practice to store these things. Should you be using a property file (yaml, in this case)? OR Should you just make a table in the database and read it from there? OR Should you just have a hash_map like structure in your ruby (or any other language) code?