Sha256: e57a50c03fc6f4a2e68a354afe067329b735550a7140a4cdcb23bfa736058b4d

Contents?: true

Size: 508 Bytes

Versions: 55

Compression:

Stored size: 508 Bytes

Contents

Bookmark.without_auditing do
  [
    { :name => 'running', :query => 'state = running' },
    { :name => 'failed', :query => 'state = paused or result = error or result = warning' }

  ].each do |item|
    next if Bookmark.where(:name => item[:name]).first
    next if SeedHelper.audit_modified? Bookmark, item[:name]
    b = Bookmark.create({ :controller => 'foreman_tasks_tasks', :public => true }.merge(item))
    raise "Unable to create bookmark: #{format_errors b}" if b.nil? || b.errors.any?
  end
end

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
foreman-tasks-2.0.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-2.0.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.1.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.1.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-2.0.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-2.0.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.2.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.1.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.1.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.17.6 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.0.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-1.0.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.17.5 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.17.4 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.17.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.17.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.16.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.17.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.15.11 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.16.2 db/seeds.d/61-foreman_tasks_bookmarks.rb