It all started with a project in which I was working on, it contained too many constant tables like Country, City etc. It was a team of 3 people including me. We had tough time querying to check if the user belonged to a certain country.
The above code was present all over the place. Being obsessed with elegance, we all wanted something like the following,
Additionally, there were many places in which we had to query for the country record.
And again we felt something wrong and wanted it to be more elegant and easy to read, so we decided we wanted to replace it with this,
We wrote a module to be included in all the constant model’s and being open source enthusiasts we extracted it into a gem which is hosted in github.
This module is young, so we need support from people to make it better. So feel free to contribute to the repo.