Class: Superform::Rails::Components::TextareaComponent

Inherits:
FieldComponent show all
Defined in:
lib/superform/rails.rb

Instance Attribute Summary

Attributes inherited from BaseComponent

#dom, #field

Instance Method Summary collapse

Methods inherited from FieldComponent

#field_attributes

Methods inherited from BaseComponent

#field_attributes, #focus, #initialize

Constructor Details

This class inherits a constructor from Superform::Rails::Components::BaseComponent

Instance Method Details

#template(&content) ⇒ Object



328
329
330
331
# File 'lib/superform/rails.rb', line 328

def template(&content)
  content ||= Proc.new { dom.value }
  textarea(**attributes, &content)
end