Skip to content

Commit

Permalink
bundle exec standardrb --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
compwron committed May 12, 2023
1 parent 3352e14 commit 3be6280
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/models/casa_org.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/helpers/phone_number_helper_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3be6280

Please sign in to comment.