The commit fixes issues in the `Country` model to properly handle
timezones when it's a string. The change processes the content and
parses it as JSON data, and fixes an issue with JSON format.
- The `format_timezones` method now attempts to parse and reformat
timezones to prevent potential JSON parsing errors.
- If the conversion to JSON fails, logs the error.
- The code ensures data integrity
by parsing and reformatting the JSON for timezone data to solve a
bug.
</commit_message>
</commit_message>
</commit_message>
This ensures the data is correctly formatted for easier handling
and prevents potential runtime errors when reading timezone data.
</commit_message>
- Updated timezone parsing to handle JSON format.
- Modified how timezones are fetched in multiple models.
- Added a migration to convert existing timezones data.
- Modified the country model to format timezones.
This commit fixes an issue where the timezone data was not
being correctly parsed, leading to potential errors in time
calculations. The changes ensure the application correctly
handles and displays timezone information, improving the
accuracy of time-related features.
- Changed `timezones` attribute from text to JSONB in `Country`.
- Updated related model methods to handle JSONB data.
- Added a migration to convert existing timezone data.
- Used safe navigation operators to prevent errors.
This change improves the storage and management of timezone
information by using the JSONB data type. It includes data
migration to handle existing timezone data.
- Implement Country and Region models
- Establish relationships between City, Country, and Region
- Update ActiveAdmin setup for managing countries and regions
- Add localization support for cities and countries in multiple languages
- Create necessary migrations to support the new schema
This update allows for better categorization of cities under their respective countries and regions, enhancing geographical structure and support for multilingual features.