Sha256: d6beacb1a5f88a12d981dfa86b9471819624800860cafafa8321c7fa8add020d

Contents?: true

Size: 792 Bytes

Versions: 5

Compression:

Stored size: 792 Bytes

Contents

# This file should contain all the record creation needed to seed the database with its default values.
# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup).
#
# Examples:
#
#   movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }])
#   Character.create(name: 'Luke', movie: movies.first)

Hyrax::Engine.load_seed unless ActiveModel::Type::Boolean.new.cast(ENV["SKIP_HYRAX_ENGINE_SEED"])

puts "\n== Loading users"
User.where(email: 'admin@example.com').first_or_create do |f|
  f.password = 'admin_password'
end

User.where(email: 'basic_user@example.com').first_or_create do |f|
  f.password = 'password'
end

User.where(email: 'another_user@example.com').first_or_create do |f|
  f.password = 'password'
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
hyrax-3.4.0 .dassie/db/seeds.rb
hyrax-3.3.0 .dassie/db/seeds.rb
hyrax-3.2.0 .dassie/db/seeds.rb
hyrax-3.1.0 .dassie/db/seeds.rb
hyrax-3.0.2 .dassie/db/seeds.rb