Sha256: edad3fcadcc9c6dab45d27a07d62b2b26225fdba6b243a3fe0aa98ad511540e5

Contents?: true

Size: 439 Bytes

Versions: 28

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

module Renalware
  log "Adding Default Event Types e.g. Biopsy, Swabs" do
    file_path = File.join(File.dirname(__FILE__), "event_types.csv")

    CSV.foreach(file_path, headers: true) do |row|
      Events::Type.find_or_create_by!(name: row["name"],
                                      event_class_name: row["event_class_name"],
                                      slug: row["slug"])
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
renalware-core-2.0.167 db/seeds/default/events/event_types.rb
renalware-core-2.0.166 db/seeds/default/events/event_types.rb
renalware-core-2.0.165 db/seeds/default/events/event_types.rb
renalware-core-2.0.164 db/seeds/default/events/event_types.rb
renalware-core-2.0.163 db/seeds/default/events/event_types.rb
renalware-core-2.0.162 db/seeds/default/events/event_types.rb
renalware-core-2.0.161 db/seeds/default/events/event_types.rb
renalware-core-2.0.160 db/seeds/default/events/event_types.rb
renalware-core-2.0.159 db/seeds/default/events/event_types.rb
renalware-core-2.0.158 db/seeds/default/events/event_types.rb
renalware-core-2.0.157 db/seeds/default/events/event_types.rb
renalware-core-2.0.156 db/seeds/default/events/event_types.rb
renalware-core-2.0.155 db/seeds/default/events/event_types.rb
renalware-core-2.0.153 db/seeds/default/events/event_types.rb
renalware-core-2.0.152 db/seeds/default/events/event_types.rb
renalware-core-2.0.151 db/seeds/default/events/event_types.rb
renalware-core-2.0.149 db/seeds/default/events/event_types.rb
renalware-core-2.0.148 db/seeds/default/events/event_types.rb
renalware-core-2.0.147 db/seeds/default/events/event_types.rb
renalware-core-2.0.146 db/seeds/default/events/event_types.rb