docbrown/lib/data_update_scripts/20200901040521_create_profile_fields.rb

10 lines
314 B
Ruby

module DataUpdateScripts
class CreateProfileFields
def run
# NOTE: the CSV importer uses find_or_create_by for both fields and
# groups, so this operation is idempotent.
csv = Rails.root.join("lib/data/dev_profile_fields.csv")
ProfileFields::ImportFromCsv.call(csv)
end
end
end