Sha256: e1b0fb1e418d60923baf7fa4251a2a10824fe57274b191fd9f01d94108eec314

Contents?: true

Size: 609 Bytes

Versions: 2

Compression:

Stored size: 609 Bytes

Contents

require "faker"

separator = ">>>>>>>><<<<<<<<<<"

p separator

ballot_form_id = 0
ballot_form_detail_id = 0

5.times do
  ballot_form_id += 1
  RailsVoter::BallotForm.create(name: Faker::StarWars.planet)

  2.times do
    ballot_form_detail_id += 1

    RailsVoter::BallotFormDetail.create(
      name: Faker::StarWars.character,
      ballot_form_id: ballot_form_id
    )

    3.times do
      RailsVoter::VotingResult.create(ballot_form_detail_id: ballot_form_detail_id)
    end
  end
end

message = "5 ballot forms, 10 ballot form details and 30 voting results created."
p separator
p message
p separator

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rails_voter-0.0.3 db/seeds.rb
rails_voter-0.0.2 db/seeds.rb