From 58d3ad412a5db78ac92002a5491acdec758f48de Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 12 Jan 2022 16:01:32 +0000 Subject: [PATCH] Rename method for clarity --- app/helpers/terms_and_conditions_helper.rb | 8 ++++---- app/services/terms_of_service.rb | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/terms_and_conditions_helper.rb b/app/helpers/terms_and_conditions_helper.rb index 35232da157..2eb4773ecf 100644 --- a/app/helpers/terms_and_conditions_helper.rb +++ b/app/helpers/terms_and_conditions_helper.rb @@ -7,11 +7,11 @@ module TermsAndConditionsHelper end def render_terms_and_conditions - if platform_terms_required? && terms_and_conditions_activated? + if platform_terms_required? && distributor_terms_required? render("checkout/all_terms_and_conditions") elsif platform_terms_required? render "checkout/platform_terms_of_service" - elsif terms_and_conditions_activated? + elsif distributor_terms_required? render "checkout/terms_and_conditions" end end @@ -20,8 +20,8 @@ module TermsAndConditionsHelper TermsOfService.platform_terms_required? end - def terms_and_conditions_activated? - TermsOfService.terms_and_conditions_activated?(current_order.distributor) + def distributor_terms_required? + TermsOfService.distributor_terms_required?(current_order.distributor) end def all_terms_and_conditions_already_accepted? diff --git a/app/services/terms_of_service.rb b/app/services/terms_of_service.rb index 32ca768d0c..62e497f7ff 100644 --- a/app/services/terms_of_service.rb +++ b/app/services/terms_of_service.rb @@ -15,7 +15,7 @@ class TermsOfService Spree::Config.shoppers_require_tos end - def self.terms_and_conditions_activated?(distributor) + def self.distributor_terms_required?(distributor) distributor.terms_and_conditions.file? end end