- 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.
27 lines
538 B
Ruby
27 lines
538 B
Ruby
india = Country.find_by code: 'IN'
|
|
|
|
City.create!([
|
|
{
|
|
name: 'Mumbai',
|
|
latitude: 19.0760,
|
|
longitude: 72.8777,
|
|
country: india,
|
|
timezone: 'Asia/Kolkata',
|
|
active: true,
|
|
priority: 100,
|
|
last_weather_fetch: 10.hours.ago,
|
|
last_image_generation: 10.hours.ago
|
|
},
|
|
{
|
|
name: 'Bengaluru',
|
|
latitude: 12.9716,
|
|
longitude: 77.5946,
|
|
country: india,
|
|
timezone: 'Asia/Kolkata',
|
|
active: true,
|
|
priority: 100,
|
|
last_weather_fetch: 10.hours.ago,
|
|
last_image_generation: 10.hours.ago
|
|
}
|
|
])
|