Class: Pageflow::Admin::EmbedCodeField Private

Inherits:
ViewComponent
  • Object
show all
Defined in:
app/views/components/pageflow/admin/embed_code_field.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Since:

  • 12.2

Instance Method Summary collapse

Instance Method Details

#build(snippet, options = {}) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 12.2



7
8
9
10
11
12
13
# File 'app/views/components/pageflow/admin/embed_code_field.rb', line 7

def build(snippet, options = {})
  super(class: 'embed_code')
  text_node(text_field_tag(options.fetch(:name),
                           snippet.call,
                           onclick: '$(this).select()'))
  para(options[:hint])
end