From ab65b2d74505cc3485b8882898ca321dbb2f9860 Mon Sep 17 00:00:00 2001 From: Gaetan Craig-Riou Date: Wed, 10 Sep 2025 09:51:47 +1000 Subject: [PATCH] Per review, fix various syntax/misspell --- .../tag_rule_group_form_component.html.haml | 2 +- app/controllers/admin/tag_rules_controller.rb | 2 +- app/views/admin/enterprises/form/_tag_rules.html.haml | 2 +- spec/services/product_tag_rules_filterer_spec.rb | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/components/tag_rule_group_form_component/tag_rule_group_form_component.html.haml b/app/components/tag_rule_group_form_component/tag_rule_group_form_component.html.haml index 54951537e6..1a6afd9b9c 100644 --- a/app/components/tag_rule_group_form_component/tag_rule_group_form_component.html.haml +++ b/app/components/tag_rule_group_form_component/tag_rule_group_form_component.html.haml @@ -21,7 +21,7 @@ = t('components.tag_rule_group_form.no_rules_yet') - else - group[:rules].each do |rule| - -rule_index += 1 + - rule_index += 1 = render(TagRuleFormComponent.new(rule: rule, index: rule_index, customer_tags: group[:tags], diff --git a/app/controllers/admin/tag_rules_controller.rb b/app/controllers/admin/tag_rules_controller.rb index 98cd9f34bd..360aea9f6d 100644 --- a/app/controllers/admin/tag_rules_controller.rb +++ b/app/controllers/admin/tag_rules_controller.rb @@ -19,7 +19,7 @@ module Admin end respond_with do |format| - return format.turbo_stream { render :new, status: } + format.turbo_stream { render :new, status: } end end diff --git a/app/views/admin/enterprises/form/_tag_rules.html.haml b/app/views/admin/enterprises/form/_tag_rules.html.haml index ab70f8001e..c5e0f98d01 100644 --- a/app/views/admin/enterprises/form/_tag_rules.html.haml +++ b/app/views/admin/enterprises/form/_tag_rules.html.haml @@ -10,7 +10,7 @@ .no_tags = t('.no_tags_yet') - = render 'admin/enterprises/form/tag_rules/default_rules', f: f, current_rule_index: current_rule_index + = render 'admin/enterprises/form/tag_rules/default_rules', f:, current_rule_index: #customer-tag-rule - tag_groups(rules).each_with_index do |group, group_index| diff --git a/spec/services/product_tag_rules_filterer_spec.rb b/spec/services/product_tag_rules_filterer_spec.rb index 3df5a41a10..50d31d25da 100644 --- a/spec/services/product_tag_rules_filterer_spec.rb +++ b/spec/services/product_tag_rules_filterer_spec.rb @@ -72,7 +72,7 @@ RSpec.describe ProductTagRulesFilterer do expect(filterer.call).not_to include(variant_hidden_by_rule.variant) end - context "with mutiple conflicting rules" do + context "with multiple conflicting rules" do it "applies the hide rule" do # Customer has show rule tag and hide rule tag customer.update_attribute(:tag_list, @@ -117,7 +117,7 @@ RSpec.describe ProductTagRulesFilterer do expect(filterer.call).to include(variant_hidden_by_default.variant) end - context "with mutiple conflicting rules applying to same variant" do + context "with multiple conflicting rules applying to same variant" do it "applies the show rule" do # customer has show rule and hide rule tag customer.update_attribute(:tag_list,