Sha256: 14b90ae1072dd7c5ab6ff15cd5887fbe025f6cb141f87022ea1963d8dc871cca
Contents?: true
Size: 676 Bytes
Versions: 40
Compression:
Stored size: 676 Bytes
Contents
# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # !! PLEASE KEEP THIS SCRIPT IDEMPOTENT !! # unless Rails.env.test? ::Katello::OrganizationCreator.seed_all_organizations! end if ENV['SEED_ORGANIZATION'] if Setting['db_pending_seed'] admin = User.where(:login => ENV['SEED_ADMIN_USER'].present? ? ENV['SEED_ADMIN_USER'] : 'admin').first if admin && admin.default_organization.nil? admin.default_organization = Organization.find_by(:name => ENV['SEED_ORGANIZATION']) admin.save! end end end
Version data entries
40 entries across 40 versions & 1 rubygems