Class: Pageflow::Admin::EmbedCodeField

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

Overview

Since:

  • 12.2

Instance Method Summary collapse

Instance Method Details

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

Since:

  • 12.2



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

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