Skip to content

Commit

Permalink
Re-ignore rubocop, tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Aug 4, 2024
1 parent ca158db commit adc0b0d
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions app/helpers/forms_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,9 @@ def text_field_with_label(**args)
# autocompletes, and Safari is not much better - you just can't turn their
# crap off. (documented on SO)
#
def autocompleter_field(**args)
ac_args = autocompleter_field_args(**args)

if args[:textarea] == true
text_area_with_label(**ac_args)
else
text_field_with_label(**ac_args)
end
end

# rubocop:disable Metrics/AbcSize
def autocompleter_field_args(**args)
# rubocop:disable Metrics/MethodLength
def autocompleter_field(**args)
ac_args = {
placeholder: :start_typing.l, autocomplete: "off",
data: { autocompleter_target: "input" }
Expand Down Expand Up @@ -247,9 +238,15 @@ def autocompleter_field_args(**args)
concat(autocompleter_dropdown)
concat(args[:append])
end
ac_args

if args[:textarea] == true
text_area_with_label(**ac_args)
else
text_field_with_label(**ac_args)
end
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/MethodLength

def autocompleter_has_id_indicator
link_icon(:check, title: :autocompleter_has_id.l,
Expand Down

0 comments on commit adc0b0d

Please sign in to comment.