Module: Components::TextareaHelper

Defined in:
app/helpers/components/textarea_helper.rb

Instance Method Summary collapse

Instance Method Details

#render_textarea(name:, label: false, id: nil, value: nil, **options) ⇒ Object



2
3
4
5
6
7
8
9
10
11
12
# File 'app/helpers/components/textarea_helper.rb', line 2

def render_textarea(name:, label: false, id: nil, value: nil, **options)
  options.reverse_merge!(rows: 3, required: false, disabled: false,
    readonly: false, class: "", label: false, placeholder: "Type here...")
  render partial: "components/ui/textarea", locals: {
    label:,
    name:,
    value:,
    id:,
    options: options
  }
end