Class: Actions::Katello::SyncPlan::RemoveProducts
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::SyncPlan::RemoveProducts
- Defined in:
- app/lib/actions/katello/sync_plan/remove_products.rb
Instance Method Summary collapse
Instance Method Details
#humanized_name ⇒ Object
17 18 19 |
# File 'app/lib/actions/katello/sync_plan/remove_products.rb', line 17 def humanized_name _("Update Sync Plan Products") end |
#plan(sync_plan, product_ids) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 |
# File 'app/lib/actions/katello/sync_plan/remove_products.rb', line 5 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 => nil) end end |