Adapt seeds file to use ActsAsTenant
Some checks failed
Check usage of free licenses / check-licenses (pull_request) Successful in 40s
Add copyright notice / copyright_notice (pull_request) Successful in 1m9s
Run unit tests / unit_tests (pull_request) Failing after 3m30s

This commit is contained in:
Manuel Bustillo 2024-11-30 20:06:36 +01:00
parent 8bff98b165
commit 5b3c1fdfac

View File

@ -9,8 +9,7 @@ Group.delete_all
Wedding.delete_all
Wedding.create!(slug: :default, date: 1.year.from_now)
ActsAsTenant.with_tenant(Wedding.create!(slug: :default, date: 1.year.from_now)) do
Expense.create!(name: 'Photographer', amount: 3000, pricing_type: 'fixed')
Expense.create!(name: 'Country house', amount: 6000, pricing_type: 'fixed')
Expense.create!(name: 'Catering', amount: 200, pricing_type: 'per_person')
@ -72,7 +71,7 @@ ActiveJob.perform_all_later(3.times.map { TableSimulatorJob.new })
'red'.paint.palette.triad(as: :hex).zip(Group.roots).each { |(color, group)| group.update!(color: color.paint.desaturate(40)) }
Group.roots.each(&:colorize_children)
end
User.create!(
email: 'development@example.com',
confirmed_at: Time.zone.now,