Make budget groups translatable
This commit is contained in:
@@ -52,14 +52,22 @@ section "Creating Budgets" do
|
||||
end
|
||||
|
||||
Budget.all.each do |budget|
|
||||
city_group = budget.groups.create!(name: I18n.t('seeds.budgets.groups.all_city'))
|
||||
city_group_params = {
|
||||
name_en: I18n.t("seeds.budgets.groups.all_city", locale: :en),
|
||||
name_es: I18n.t("seeds.budgets.groups.all_city", locale: :es)
|
||||
}
|
||||
city_group = budget.groups.create!(city_group_params)
|
||||
city_group.headings.create!(name: I18n.t('seeds.budgets.groups.all_city'),
|
||||
price: 1000000,
|
||||
population: 1000000,
|
||||
latitude: '40.416775',
|
||||
longitude: '-3.703790')
|
||||
|
||||
districts_group = budget.groups.create!(name: I18n.t('seeds.budgets.groups.districts'))
|
||||
districts_group_params = {
|
||||
name_en: I18n.t("seeds.budgets.groups.districts", locale: :en),
|
||||
name_es: I18n.t("seeds.budgets.groups.districts", locale: :es)
|
||||
}
|
||||
districts_group = budget.groups.create!(districts_group_params)
|
||||
districts_group.headings.create!(name: I18n.t('seeds.geozones.north_district'),
|
||||
price: rand(5..10) * 100000,
|
||||
population: 350000,
|
||||
|
||||
Reference in New Issue
Block a user