Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specifying number_of_records on a seeder appears to not work #52

Open
FireGamer3 opened this issue Jul 11, 2022 · 1 comment
Open

Specifying number_of_records on a seeder appears to not work #52

FireGamer3 opened this issue Jul 11, 2022 · 1 comment

Comments

@FireGamer3
Copy link
Contributor

Given

class PropertiesSeeder < Planter::Seeder
  seeding_method :data_array, number_of_records: 4, parent: :user

  def data
    [{
      street_1: Faker::Address.street_address,
      city: Faker::Address.city,
      state: Faker::Address.state_abbr,
      zip: Faker::Address.zip
    }]
  end
end

it appears that it will not seed more than one record per parent.
image

@evanthegrayt
Copy link
Owner

Hmmm... I'll have to take a look at this when I have time. I have a test written for it, but def curious why it's not working for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants