Sha256: 0cf62b3ad0a85637ffb0ef2ec724fccbcce98f4937e568f5b97768cf7ff57906

Contents?: true

Size: 596 Bytes

Versions: 22

Compression:

Stored size: 596 Bytes

Contents

module Actions
  module Katello
    module ContentView
      class AddToEnvironment < Actions::Base
        def plan(content_view_version, environment)
          content_view = content_view_version.content_view
          if cve = content_view.content_view_environment(environment)
            content_view_version.content_view_environments << cve
          else
            cve = content_view.add_environment(environment, content_view_version)
            plan_action(ContentView::EnvironmentCreate, cve)
          end
          content_view_version.save!
        end
      end
    end
  end
end

Version data entries

22 entries across 22 versions & 1 rubygems

Version Path
katello-2.4.0.rc2 app/lib/actions/katello/content_view/add_to_environment.rb
katello-2.4.0.rc1 app/lib/actions/katello/content_view/add_to_environment.rb