Sha256: 9f76b4fc2be102e2ec1743c1b598943e173412a7dace5c3b5f0ce7e5730214d3
Contents?: true
Size: 791 Bytes
Versions: 49
Compression:
Stored size: 791 Bytes
Contents
# This concern helps us figure out what kind of items (field, tool, tab_group, or panel) have been passed to the resource or action. module Avo module Concerns module IsResourceItem extend ActiveSupport::Concern included do class_attribute :item_type, default: nil end def is_field? self.class.item_type == :field end def is_panel? self.class.item_type == :panel || self.class.item_type == :main_panel end def is_main_panel? self.class.item_type == :main_panel end def is_tool? self.class.item_type == :tool end def is_tab? self.class.item_type == :tab end def is_tab_group? self.class.item_type == :tab_group end end end end
Version data entries
49 entries across 49 versions & 1 rubygems