From 3be628042c22e62bf85eb99d429433dd571e830b Mon Sep 17 00:00:00 2001 From: Linda Goldstein Date: Fri, 12 May 2023 16:27:06 -0700 Subject: [PATCH] bundle exec standardrb --fix --- app/models/casa_org.rb | 4 ++-- app/models/user.rb | 4 ++-- spec/helpers/phone_number_helper_spec.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/models/casa_org.rb b/app/models/casa_org.rb index c94ce269c4..1d4ff9c9f9 100644 --- a/app/models/casa_org.rb +++ b/app/models/casa_org.rb @@ -106,8 +106,8 @@ def validate_twilio_credentials end def normalize_phone_number - if self.twilio_phone_number&.length == 10 - self.twilio_phone_number = "+1#{self.twilio_phone_number}" + if twilio_phone_number&.length == 10 + self.twilio_phone_number = "+1#{twilio_phone_number}" end end end diff --git a/app/models/user.rb b/app/models/user.rb index c7ccac5af8..1dca574781 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -176,8 +176,8 @@ def after_confirmation private def normalize_phone_number - if self.phone_number&.length == 10 - self.phone_number = "+1#{self.phone_number}" + if phone_number&.length == 10 + self.phone_number = "+1#{phone_number}" end end end diff --git a/spec/helpers/phone_number_helper_spec.rb b/spec/helpers/phone_number_helper_spec.rb index c56d0468c8..f948ff7b4b 100644 --- a/spec/helpers/phone_number_helper_spec.rb +++ b/spec/helpers/phone_number_helper_spec.rb @@ -5,7 +5,7 @@ include PhoneNumberHelper context "valid phone number" do - it 'with empty string' do + it "with empty string" do valid, error = valid_phone_number("") expect(valid).to be(true) expect(error).to be_nil