Skip to content

Commit

Permalink
Add simple seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
maikhel committed Jul 17, 2024
1 parent 4f9768e commit 019401f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions db/seeds.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# This file should ensure the existence of records required to run the application in every environment (production,
# development, test). The code here should be idempotent so that it can be executed at any point in every environment.
# The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup).
#
# Example:
#
# ["Action", "Comedy", "Drama", "Horror"].each do |genre_name|
# MovieGenre.find_or_create_by!(name: genre_name)
# end
board = Board.create!(name: "Visuality Workshops")

[ 'To Do', 'In Progress', 'Review', 'Done', 'Archived' ].each_with_index do |column_name, index|
column = board.board_columns.create!(name: column_name)

rand(1..3).times do |j|
column.cards.create!(title: "Card #{j + 1}", description: "Description for card #{j + 1} in #{column_name}")
end
end

puts 'Seed data created successfully!'
puts 'Have fun at our workshops!'

0 comments on commit 019401f

Please sign in to comment.