Sha256: 613dcd8e19a042b09dc6ff5d167893730161c08b1e6f433046c0a24652402869
Contents?: true
Size: 864 Bytes
Versions: 126
Compression:
Stored size: 864 Bytes
Contents
module Avo module Concerns module HasEditableControls extend ActiveSupport::Concern included do class_attribute :show_controls class_attribute :show_controls_holder class_attribute :show_controls_holder_called, default: false end def has_show_controls? return false if ::Avo::App.license.lacks_with_trial(:resource_show_controls) self.class.show_controls.present? end def render_show_controls return [] if ::Avo::App.license.lacks_with_trial(:resource_show_controls) if show_controls.present? Avo::Resources::Controls::ExecutionContext.new( block: show_controls, resource: self, record: model, view: view ).handle&.items || [] else [] end end end end end
Version data entries
126 entries across 126 versions & 1 rubygems