ManageIQ/manageiq-ui-classic

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

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
class ApplicationHelper::Button::CustomizationTemplate < ApplicationHelper::Button::Basic
  def visible?
    !root? && !system?
  end

  private

  def root?
    @view_context.nodes.first == 'root'
  end

  def system?
    @view_context.nodes.last == 'system' || @record.try(:system)
  end
end