class ApplicationHelper::Button::CloudVolumeBackupCreate < ApplicationHelper::Button::ButtonNewDiscover
  def disabled?
    ManageIQ::Providers::CloudManager.none? do |ems|
      Module.const_defined?("#{ems.class}::CloudVolume") &&
        ems.class::CloudVolume.supports?(:backup_create)
    end
  end
end

class ApplicationHelper::Button::CloudVolumeBackupCreate < ApplicationHelper::Button::ButtonNewDiscover
  def disabled?
    ManageIQ::Providers::CloudManager.none? do |ems|
      "#{ems.class}::CloudVolume".safe_constantize&.supports?(:backup_create)
    end
  end
end

Fix constantizing CloudVolume for disable? check
Fix constantizing CloudVolume for disable? check

In some environments Module.const_defined?("Namespace::CloudVolume")
returns ::CloudVolume so this check doesn't work.
Module.const_defined?("ManageIQ::Providers::Amazon::CloudManager::CloudVolume")
returns true then invoking #supports?() on that class raises a
NameError.

String#safe_constantize is a more reliable way of determining if a class
exists.
