From 48ef7b034a1597b41fa8540b443ead961a9e0bfe Mon Sep 17 00:00:00 2001 From: Martin Lensment Date: Tue, 14 Oct 2014 12:48:19 +0300 Subject: [PATCH] Modify seeds --- db/seeds.rb | 38 +++++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/db/seeds.rb b/db/seeds.rb index 1db700597..c515fd710 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -14,28 +14,28 @@ zone = Registrar.where( reg_no: '10577829', address: 'Lõõtsa 2, Tallinna linn, Harju maakond, 11415', country: Country.first -).first_or_create! +).first_or_create EppUser.where( - username: 'zone', + username: 'zone', password: 'ghyt9e4fu', active: true, registrar: zone -).first_or_create! +).first_or_create elkdata = Registrar.where( name: 'Elkdata OÜ', reg_no: '10510593', address: 'Tondi 51-10, 11316 Tallinn', country: Country.first -).first_or_create! +).first_or_create EppUser.where( username: 'elkdata', password: '8932iods', active: true, registrar: elkdata -).first_or_create! +).first_or_create User.where( username: 'gitlab', @@ -44,7 +44,7 @@ User.where( admin: true, identity_code: '37810013855', country: Country.where(name: 'Estonia').first -).first_or_create! +).first_or_create User.where( username: 'zone', @@ -52,9 +52,9 @@ User.where( email: 'info-info@zone.ee', admin: false, identity_code: '37810010085', - registrar_id: zone.id, + registrar_id: zone.id, country: Country.where(name: 'Estonia').first -).first_or_create! +).first_or_create User.where( username: 'elkdata', @@ -64,4 +64,24 @@ User.where( identity_code: '37810010727', registrar_id: elkdata.id, country: Country.where(name: 'Estonia').first -).first_or_create! +).first_or_create + +sg = SettingGroup.where(code: 'domain_validation').first_or_create + +s_1 = Setting.where(code: 'ns_min_count').first_or_create +s_1.value = 1 + +s_2 = Setting.where(code: 'ns_max_count').first_or_create +s_2.value = 13 + +sg.settings = [s_1, s_2] +sg.save + +sg = SettingGroup.where(code: 'domain_general').first_or_create + +s_1 = Setting.where(code: 'transfer_wait_time').first_or_create +s_1.value = 0 + +sg.settings = [s_1] +sg.save +