Module: FakeDataLoader

Extended by:
FactoryBot::Syntax::Methods
Defined in:
lib/potassium/assets/seeds/fake_data_loader.rb,
lib/potassium/assets/seeds/admin_data_loader.rb

Class Method Summary collapse

Class Method Details

.loadObject



30
31
32
# File 'lib/potassium/assets/seeds/fake_data_loader.rb', line 30

def self.load
  # Put here the code to generate data with DEVELOPMENT PURPOSES.
end

.load_adminObject



34
35
36
37
38
39
# File 'lib/potassium/assets/seeds/admin_data_loader.rb', line 34

def self.load_admin
  email = "[email protected]"
  pass = "password"
  admin = AdminUser.find_by(email: email)
  AdminUser.create!(email: email, password: pass, password_confirmation: pass) unless admin
end