1234567891011121314151617181920 |
- User.delete_all
- User.reset_pk_sequence
- Activity.delete_all
- Activity.reset_pk_sequence
-
- 10.times do |i|
- name = Faker::Name.first_name.downcase
- user = User.create! username: "#{name}", email: "#{name}@email.com", password: "azerty"
- puts "Created user ##{i} - #{user.username}"
-
- 2.times do
- activity = Activity.create!(
- name: Faker::Science.element,
- client: Faker::Company.name,
- description: Faker::Company.catch_phrase,
- author_id: user.id
- )
- puts "Created activity \"#{activity.name}\" for #{activity.client}"
- end
- end
|