ManageIQ/manageiq-ui-classic

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

Summary

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

  def disabled?
    @error_message = @record.unsupported_reason(@feature) unless @record.supports?(@feature)
    @error_message.present?
  end

  def visible?
    true
  end
end