From 0bc6cbe177e3991983daa62ad027fd26bf95049c Mon Sep 17 00:00:00 2001 From: Antoine Girard Date: Thu, 23 Jan 2025 09:31:05 +0100 Subject: [PATCH] Review --- lib/dsfr-form_builder.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/dsfr-form_builder.rb b/lib/dsfr-form_builder.rb index 26473e8..8f3acc9 100644 --- a/lib/dsfr-form_builder.rb +++ b/lib/dsfr-form_builder.rb @@ -61,12 +61,12 @@ def dsfr_check_box(attribute, opts = {}) end end - def dsfr_select(attribute, choices, opts = { input_options: {} }) + def dsfr_select(attribute, choices, input_options: {}, **opts) @template.content_tag(:div, class: "fr-select-group") do @template.safe_join( [ - dsfr_label_with_hint(attribute, opts.except(:input_options)), - dsfr_select_tag(attribute, choices, **opts, **(opts[:input_options] || {})), + dsfr_label_with_hint(attribute, opts), + dsfr_select_tag(attribute, choices, **opts, **(input_options)), dsfr_error_message(attribute) ] )