Skip to content

Commit

Permalink
Fix seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
aliciapaz committed Mar 29, 2024
1 parent 62b8ed4 commit b68ffbc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
main = false
end
# Create random location around cities in US
Rake::Task['populate:random_locations'].invoke
Rake::Task["populate:random_locations"].invoke

# Create organizations and causes association
Rake::Task['populate:seed_organizations_causes'].invoke
Rake::Task["populate:seed_organizations_causes"].invoke
end
2 changes: 1 addition & 1 deletion lib/tasks/populate.rake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace :populate do

desc "Seed organizations and causes association"
task seed_organizations_causes: :environment do
Organization.all.each do |organization|
Organization.all.find_each do |organization|
OrganizationCause.create!(organization: organization, cause: Cause.all.sample)
organization.update!(active: true)
end
Expand Down

0 comments on commit b68ffbc

Please sign in to comment.