Create a seed file
This guide will help you write your first seed file.
-
Create the file
Create a file called
my_seed.rb
anywhere. -
Add the Skeleton
All Ruby seeds must contain the following skeleton.
my_seed.rb class DataSeederdef seedendend -
Create a couple Group Labels
my_seed.rb class DataSeederdef seedcreate(:group_label, group: @group, title: 'bug', color: '#FF0000')create(:group_label, group: @group, title: 'feature', color: '#FFFF00')endend