- Use `find_or_initialize_by` to ensure uniqueness based on multiple attributes. - Replace multiple `update!` calls with `assign_attributes` for better readability and maintainability. - Add error handling for city saving process to log errors if saving fails. These changes streamline the city syncing process, making it more efficient and easier to understand while ensuring that cities are created or updated correctly based on unique attributes. |
||
---|---|---|
.. | ||
.keep | ||
study_rake.rake | ||
sync_geo_data.rake |