From 735176e5a4ca4284460333325d7a06ebe6337ef5 Mon Sep 17 00:00:00 2001 From: Alan Nascimento Date: Mon, 28 Oct 2024 12:06:11 -0300 Subject: [PATCH] feat: Adiciona helper no form builder para o componente text area (#101) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Adiciona estado ao componente text area * feat: Adiciona helper para text area * refactor: Remove código de teste --- app/helpers/ink_components/form_builder.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/helpers/ink_components/form_builder.rb b/app/helpers/ink_components/form_builder.rb index 8867425..b933bf7 100644 --- a/app/helpers/ink_components/form_builder.rb +++ b/app/helpers/ink_components/form_builder.rb @@ -61,6 +61,11 @@ def select(attribute, choices = nil, select_options = {}, tag_options = {}) end end + def text_area(attribute, **) + state = field_state(attribute) + text_area_component(state:, **html_options(attribute), **) + end + def error_message(attribute, **) state = field_state(attribute) helper_text_component(state:, **) { error_messages(attribute) }