Skip to content

Create a seed file

This guide will help you write your first seed file.

  1. Create the file

    Create a file called my_seed.rb anywhere.

  2. Add the Skeleton

    All Ruby seeds must contain the following skeleton.

    my_seed.rb
    class DataSeeder
    def seed
    end
    end
  3. Create a couple Group Labels

    my_seed.rb
    class DataSeeder
    def seed
    create(:group_label, group: @group, title: 'bug', color: '#FF0000')
    create(:group_label, group: @group, title: 'feature', color: '#FFFF00')
    end
    end