diff --git a/app/components/admin/poll/officers/officers_component.html.erb b/app/components/admin/poll/officers/officers_component.html.erb index f35ae2793..54784ebaf 100644 --- a/app/components/admin/poll/officers/officers_component.html.erb +++ b/app/components/admin/poll/officers/officers_component.html.erb @@ -1,4 +1,4 @@ -<%= tag.table options do %> +<%= tag.table(**options) do %> <%= t("admin.poll_officers.officer.name") %> diff --git a/app/components/admin/stats/stat_component.html.erb b/app/components/admin/stats/stat_component.html.erb index 684b016a3..fa5b95999 100644 --- a/app/components/admin/stats/stat_component.html.erb +++ b/app/components/admin/stats/stat_component.html.erb @@ -1,5 +1,5 @@
- <%= tag.p(options) do %> + <%= tag.p(**options) do %> <%= text %>
<%= amount %> <% end %>
diff --git a/app/components/shared/link_list_component.html.erb b/app/components/shared/link_list_component.html.erb index 86239013b..dc001156e 100644 --- a/app/components/shared/link_list_component.html.erb +++ b/app/components/shared/link_list_component.html.erb @@ -1 +1 @@ -<%= tag.ul(options) { safe_join(list_items, "\n") } %> +<%= tag.ul(**options) { safe_join(list_items, "\n") } %> diff --git a/app/components/shared/link_list_component.rb b/app/components/shared/link_list_component.rb index 683bc80db..3a9a21b68 100644 --- a/app/components/shared/link_list_component.rb +++ b/app/components/shared/link_list_component.rb @@ -18,7 +18,7 @@ class Shared::LinkListComponent < ApplicationComponent def list_items present_links.map do |text, url, current = false, **link_options| - tag.li(({ "aria-current": true } if current)) do + tag.li("aria-current": (true if current)) do if url link_to text, url, link_options else diff --git a/app/helpers/stats_helper.rb b/app/helpers/stats_helper.rb index 867cab161..acc79319b 100644 --- a/app/helpers/stats_helper.rb +++ b/app/helpers/stats_helper.rb @@ -2,7 +2,7 @@ module StatsHelper def chart_tag(opt = {}) opt[:data] ||= {} opt[:data][:graph] = admin_api_stats_path(chart_data(opt)) - tag.div opt + tag.div(**opt) end def chart_data(opt = {}) @@ -26,7 +26,7 @@ module StatsHelper def budget_investments_chart_tag(opt = {}) opt[:data] ||= {} opt[:data][:graph] = admin_api_stats_path(budget_investments: true) - tag.div opt + tag.div(**opt) end def number_to_stats_percentage(number, options = {}) diff --git a/app/helpers/translatable_form_helper.rb b/app/helpers/translatable_form_helper.rb index 8b15255c3..6e73433c9 100644 --- a/app/helpers/translatable_form_helper.rb +++ b/app/helpers/translatable_form_helper.rb @@ -32,7 +32,7 @@ module TranslatableFormHelper def fields_for_locale(locale) fields_for_translation(@translations[locale]) do |translations_form| - @template.tag.div translations_options(translations_form.object, locale) do + @template.tag.div **translations_options(translations_form.object, locale) do @template.concat translations_form.hidden_field( :_destroy, value: !@template.enabled_locale?(translations_form.object.globalized_model, locale),