Sha256: 1a6764a947d5be81bdd3a0c8efb785bf6eb37d8a0ddc938a726bc31594f1fc12

Contents?: true

Size: 648 Bytes

Versions: 142

Compression:

Stored size: 648 Bytes

Contents

# frozen_string_literal: true

module Renalware
  log "Adding default audits" do
    file_path = File.join(File.dirname(__FILE__), "audits.yml")
    yml_audits = YAML.load_file(file_path)
    yml_audits.each do |yml_audit|
      yml_audit.symbolize_keys!
      Reporting::Audit.find_or_create_by!(name: yml_audit[:name]) do |audit|
        audit.description = yml_audit[:description]
        audit.view_name = yml_audit[:view_name]
        audit.materialized = yml_audit[:materialized]
        audit.refresh_schedule = yml_audit[:refresh_schedule]
        audit.display_configuration = yml_audit[:display_configuration]
      end
    end
  end
end

Version data entries

142 entries across 142 versions & 1 rubygems

Version Path
renalware-core-2.1.1 db/seeds/default/reporting/audits.rb
renalware-core-2.1.0 db/seeds/default/reporting/audits.rb
renalware-core-2.0.167 db/seeds/default/reporting/audits.rb
renalware-core-2.0.166 db/seeds/default/reporting/audits.rb
renalware-core-2.0.165 db/seeds/default/reporting/audits.rb
renalware-core-2.0.164 db/seeds/default/reporting/audits.rb
renalware-core-2.0.163 db/seeds/default/reporting/audits.rb
renalware-core-2.0.162 db/seeds/default/reporting/audits.rb
renalware-core-2.0.161 db/seeds/default/reporting/audits.rb
renalware-core-2.0.160 db/seeds/default/reporting/audits.rb
renalware-core-2.0.159 db/seeds/default/reporting/audits.rb
renalware-core-2.0.158 db/seeds/default/reporting/audits.rb
renalware-core-2.0.157 db/seeds/default/reporting/audits.rb
renalware-core-2.0.156 db/seeds/default/reporting/audits.rb
renalware-core-2.0.155 db/seeds/default/reporting/audits.rb
renalware-core-2.0.153 db/seeds/default/reporting/audits.rb
renalware-core-2.0.152 db/seeds/default/reporting/audits.rb
renalware-core-2.0.151 db/seeds/default/reporting/audits.rb
renalware-core-2.0.149 db/seeds/default/reporting/audits.rb
renalware-core-2.0.148 db/seeds/default/reporting/audits.rb