- 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.
15 lines
309 B
Ruby
15 lines
309 B
Ruby
brazil = Country.find_by code: 'BZ'
|
|
|
|
City.create!([
|
|
{
|
|
name: 'Rio de Janeiro',
|
|
latitude: -22.9068,
|
|
longitude: -43.1729,
|
|
country: brazil,
|
|
timezone: 'America/Sao_Paulo',
|
|
active: true,
|
|
priority: 80,
|
|
last_weather_fetch: 10.hours.ago,
|
|
last_image_generation: 10.hours.ago
|
|
}
|
|
]) |