Module: Graphql::Dashboard::Installable
- Included in:
- DetailedTraces::TracesController, Limiters::LimitersController, OperationStore::BaseController, Subscriptions::BaseController
- Defined in:
- lib/graphql/dashboard/installable.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(child_module) ⇒ Object
7 8 9 |
# File 'lib/graphql/dashboard/installable.rb', line 7 def self.included(child_module) child_module.before_action(:check_installed) end |
Instance Method Details
#check_installed ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/graphql/dashboard/installable.rb', line 15 def check_installed if !feature_installed? @component_header_html = self.class::INSTALLABLE_COMPONENT_HEADER_HTML @component_message_html = self.class::INSTALLABLE_COMPONENT_MESSAGE_HTML render "graphql/dashboard/not_installed" end end |
#feature_installed? ⇒ Boolean
11 12 13 |
# File 'lib/graphql/dashboard/installable.rb', line 11 def feature_installed? raise "Implement #{self.class}#feature_installed? to check whether this should render `not_installed` or not." end |