blob: eb3afc394e78b5a40de1d5a998bccf95e083613d (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
 | # coding: utf-8
require_relative '../seed_helpers'
Workgroup.find_each do |workgroup|
  puts workgroup.inspect
  workgroup.custom_fields.seed_by(code: "capacity") do |field|
    field.resource_type = "VehicleJourney"
    field.name = "Bus Capacity"
    field.field_type = "list"
    field.options = { list_values: { "0": "", "1": "48 places", "2": "54 places" }}
  end
  workgroup.custom_fields.seed_by(code: "company_commercial_name") do |field|
    field.resource_type = "Company"
    field.name = "Nom commercial"
    field.field_type = "list"
    field.options = { list_values: { "0": "", "1": "OuiBus", "2": "Alsa" }}
  end
  workgroup.custom_fields.seed_by(code: "company_contact_name") do |field|
    field.resource_type = "Company"
    field.name = "Nom du référent"
    field.field_type = "string"
  end
  workgroup.custom_fields.seed_by(code: "stop_area_test_list") do |field|
    field.resource_type = "StopArea"
    field.name = "Test de Liste"
    field.field_type = "list"
    field.options = { list_values: { "0": "", "1": "Valeur 1", "2": "Valeur 2" }}
  end
  workgroup.custom_fields.seed_by(code: "stop_area_test_string") do |field|
    field.resource_type = "StopArea"
    field.name = "Test de Texte"
    field.field_type = "string"
  end
  workgroup.custom_fields.seed_by(code: "stop_area_test_integer") do |field|
    field.resource_type = "StopArea"
    field.name = "Test de Nomber"
    field.field_type = "integer"
  end
  workgroup.custom_fields.seed_by(code: "stop_area_test_attachment") do |field|
    field.resource_type = "StopArea"
    field.name = "Test de Piece Jointe"
    field.field_type = "attachment"
  end
end
 |