Sha256: 224e7e733ecd008c26ff3faa1d2318c94e1957a959843187c679ea9d9f1e3b37
Contents?: true
Size: 857 Bytes
Versions: 2
Compression:
Stored size: 857 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
avo-2.13.2.pre.2 | lib/avo/concerns/has_editable_controls.rb |
avo-2.13.2.pre.1 | lib/avo/concerns/has_editable_controls.rb |