Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix (validation): fix issue with validation raising exception if nil #64

Merged
merged 2 commits into from
Oct 20, 2024

Conversation

bradrees
Copy link
Contributor

When trying to validate a BSB, if the value is nil it raises an exception:

undefined method `gsub' for nil

from:

def normalize(str)
  str.gsub(/[^\d]/, '')
end

in bsb.rb

I picked this up in my tests:

expect(account).to validate_presence_of(:bsb)

@davelooi
Copy link
Contributor

Hey @bradrees , excellent find. Thank you for your contribution.

@davelooi davelooi merged commit ea17df1 into coinjar:master Oct 20, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants