Sha256: b13ffe6c6da93cccf2f47a1f916aee964cc625bbae06d4309ce02eb71ca7bd2f
Contents?: true
Size: 740 Bytes
Versions: 3
Compression:
Stored size: 740 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 !!! # User.as_anonymous_admin do Bookmark.without_auditing do bookmarks = [ {:name => "Without a Tag", :query => 'not has tag', :controller => "katello_docker_manifests"}, ] bookmarks.each do |input| next if SeedHelper.audit_modified? Bookmark, input[:name], :controller => input[:controller] b = Bookmark.find_or_create_by({ :public => true }.merge(input)) fail "Unable to create bookmark: #{format_errors b}" if b.nil? || b.errors.any? end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
katello-4.15.0 | db/seeds.d/111-container-image-bookmarks.rb |
katello-4.15.0.rc2 | db/seeds.d/111-container-image-bookmarks.rb |
katello-4.15.0.rc1 | db/seeds.d/111-container-image-bookmarks.rb |