Sha256: 7503205b8648f3866af33b9392832a8356d14d5857fd11e7d294b6e6d056d993
Contents?: true
Size: 613 Bytes
Versions: 56
Compression:
Stored size: 613 Bytes
Contents
# frozen_string_literal: true class Avo::Fields::TiptapField::EditComponent < Avo::Fields::EditComponent attr_reader :resource def initialize(**args) @resource = args[:resource] @resource_id = args[:resource_id] @resource_name = args[:resource_name] super(**args) end def resource_name @resource_name || resource&.singular_route_key end def resource_id @resource_id || resource&.record&.id end def tiptap_id if resource_name.present? "tiptap_#{resource_name}_#{@field.id}" elsif form.present? "tiptap_#{form.index}_#{@field.id}" end end end
Version data entries
56 entries across 56 versions & 1 rubygems