lib/generate_models.rb in cqm-models-0.8.1 vs lib/generate_models.rb in cqm-models-0.8.2
- old
+ new
@@ -206,9 +206,12 @@
contents.gsub!(/, type: Any/, '')
# Add QDM version
contents.gsub!(/field :qdmVersion, type: String/, "field :qdmVersion, type: String, default: '#{qdm_version}'")
+ # Add default to [] for facilityLocations
+ contents.gsub!(/field :facilityLocations, type: Array/, 'field :facilityLocations, type: Array, default: []')
+
# Add HQMF oid (if it exists in the given HQMF oid mapping file)
dc_name = File.basename(file_name, '.*')
if oids[dc_name].present? && oids[dc_name]['hqmf_oid'].present?
contents.gsub!(/ field :hqmfOid, type: String\n/, " field :hqmfOid, type: String, default: '#{oids[dc_name]['hqmf_oid']}'\n")
else