Sha256: b993ca9b100538ce2a617d222439dc4eb16122f3d3d6dd813298502a026c4311
Contents?: true
Size: 644 Bytes
Versions: 29
Compression:
Stored size: 644 Bytes
Contents
module Actions module Katello module SyncPlan class AddProducts < Actions::EntryAction def plan(sync_plan, product_ids) action_subject(sync_plan) products = ::Katello::Product.where(:id => product_ids).editable sync_plan.product_ids = (sync_plan.product_ids + products.collect { |p| p.id }).uniq sync_plan.save! products.each do |product| plan_action(::Actions::Katello::Product::Update, product, :sync_plan_id => sync_plan.id) end end def humanized_name _("Add Sync Plan Products") end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems