ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::GenericFeatureButton < ApplicationHelper::Button::Basic
  include ApplicationHelper

  needs :@record

  def initialize(view_context, view_binding, instance_data, props)
    super
    @feature = props[:options][:feature]
  end

  def visible?
    records_support_feature?(@record, @feature)
  end
end