- Change city name display to localized name in both index and show views - Modify schema to use bigint for certain foreign keys - Correct country codes in seeds for accurate data representation These changes improve the handling of city names, ensuring they are displayed in the appropriate localized format and ensuring well-typed foreign key relationships in the schema.
16 lines
307 B
Ruby
16 lines
307 B
Ruby
saudi_arabia = Country.find_by code: 'CA'
|
|
|
|
City.create!([
|
|
{
|
|
name: 'Riyadh',
|
|
latitude: 24.7136,
|
|
longitude: 46.6753,
|
|
country: saudi_arabia,
|
|
timezone: 'Asia/Riyadh',
|
|
active: true,
|
|
priority: 100,
|
|
last_weather_fetch: 10.hours.ago,
|
|
last_image_generation: 10.hours.ago
|
|
}
|
|
])
|