Class: Actions::Katello::Provider::Destroy
- Inherits:
-
EntryAction
- Object
- EntryAction
- Actions::Katello::Provider::Destroy
- Defined in:
- app/lib/actions/katello/provider/destroy.rb
Instance Method Summary collapse
Instance Method Details
#finalize ⇒ Object
13 14 15 16 |
# File 'app/lib/actions/katello/provider/destroy.rb', line 13 def finalize provider = ::Katello::Provider.find(input[:provider][:id]) provider.destroy! end |
#humanized_name ⇒ Object
18 19 20 |
# File 'app/lib/actions/katello/provider/destroy.rb', line 18 def humanized_name _("Delete") end |
#plan(provider, check_products = true) ⇒ Object
5 6 7 8 9 10 11 |
# File 'app/lib/actions/katello/provider/destroy.rb', line 5 def plan(provider, check_products = true) fail _("Red Hat provider can not be deleted") if !provider.being_deleted? && provider.redhat_provider? fail _("Cannot delete provider with attached products") if check_products && !provider.products.empty? action_subject(provider) plan_self end |