Sha256: 871e30e5929dc7a1d19e41b214e9bf5d363bf854a5c615c55dbb9901f8964ea6

Contents?: true

Size: 339 Bytes

Versions: 5

Compression:

Stored size: 339 Bytes

Contents

module Renalware
  log "Adding Local Event Types" do
    #change source .csv file as required. Pershaps useful to specify site in filename
    file_path = File.join(File.dirname(__FILE__), "event_types_blt.csv")

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.beta8 db/seeds/default/events/event_types_local.rb
renalware-core-2.0.0.pre.beta7 db/seeds/default/events/event_types_local.rb
renalware-core-2.0.0.pre.beta6 db/seeds/default/events/event_types_local.rb
renalware-core-2.0.0.pre.beta5 db/seeds/default/events/event_types_local.rb
renalware-core-2.0.0.pre.beta4 db/seeds/default/events/event_types_local.rb