Sprankelprachtig aan/afmeldsysteem

seeds.rb 693B

123456789101112131415161718192021222324
  1. # This file should contain all the record creation needed to seed the database with its default values.
  2. # The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
  3. #
  4. # Examples:
  5. #
  6. # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
  7. # Character.create(name: 'Luke', movie: movies.first)
  8. p = Person.create!(
  9. first_name: 'Maarten',
  10. infix: 'van den',
  11. last_name: 'Berg',
  12. birth_date: (Date.new 2016, 1, 1),
  13. email: 'maarten@maartenberg.nl.eu.org',
  14. is_admin: true
  15. )
  16. u = User.create!(
  17. email: 'maarten@maartenberg.nl.eu.org',
  18. person: p,
  19. password: 'damena123',
  20. password_confirmation: 'damena123'
  21. )