ManageIQ/manageiq-ui-classic

View on GitHub
app/helpers/application_helper/button/miq_action_delete.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::MiqActionDelete < ApplicationHelper::Button::Basic
  needs :@record

  def disabled?
    @error_message = _("Actions assigned to Policies can not be deleted") unless @record.miq_policies.empty?
    @error_message = _("Default actions can not be deleted.") if @record.action_type == "default"
    @error_message.present?
  end
end