|
|
@ -7,6 +7,7 @@ |
|
|
|
# Character.create(name: 'Luke', movie: movies.first) |
|
|
|
# Character.create(name: 'Luke', movie: movies.first) |
|
|
|
|
|
|
|
|
|
|
|
# rubocop:disable Rails/Output |
|
|
|
# rubocop:disable Rails/Output |
|
|
|
|
|
|
|
unless Rails.env.test? |
|
|
|
org = Organisation.find_or_create_by!( |
|
|
|
org = Organisation.find_or_create_by!( |
|
|
|
name: "DLUHC", |
|
|
|
name: "DLUHC", |
|
|
|
address_line1: "2 Marsham Street", |
|
|
|
address_line1: "2 Marsham Street", |
|
|
@ -53,10 +54,11 @@ if Rails.env.development? && User.count.zero? |
|
|
|
pp "Seeded 3 dummy users" |
|
|
|
pp "Seeded 3 dummy users" |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
if LaRentRange.count.zero? && !Rails.env.test? |
|
|
|
if LaRentRange.count.zero? |
|
|
|
Dir.glob("config/rent_range_data/*.csv").each do |path| |
|
|
|
Dir.glob("config/rent_range_data/*.csv").each do |path| |
|
|
|
start_year = File.basename(path, ".csv") |
|
|
|
start_year = File.basename(path, ".csv") |
|
|
|
Rake::Task["data_import:rent_ranges"].invoke(start_year, path) |
|
|
|
Rake::Task["data_import:rent_ranges"].invoke(start_year, path) |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
end |
|
|
|
# rubocop:enable Rails/Output |
|
|
|
# rubocop:enable Rails/Output |
|
|
|