Class: Shoelace::Components::SlTextarea

Inherits:
ActionView::Helpers::Tags::NumberField
  • Object
show all
Includes:
ErrorWrappable
Defined in:
app/helpers/shoelace/components/sl_textarea.rb

Overview

:nodoc:

Instance Method Summary collapse

Methods included from ErrorWrappable

#error_wrapping

Instance Method Details

#render(&block) ⇒ Object



10
11
12
13
14
15
16
17
# File 'app/helpers/shoelace/components/sl_textarea.rb', line 10

def render(&block)
  options = @options.stringify_keys
  options["value"] = options.fetch("value") { value_before_type_cast }
  options["invalid"] = options["data-invalid"] = "" if object_has_errors?
  add_default_name_and_id(options)

  @template_object.("sl-textarea", '', options, &block)
end