Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rib: normalises the name and normalise even more the RIB and IBAN
We got ASP errors because: - the INTITDEST (i.e Rib#name) had `\t` in them – they were input with tabulation as space, which is perfectly legitimate to me. Clean up the value to adress that. - the BIC length was over 11, which is because of space around them (we took care of that) but also sometimes in the middle of the value. Take care of that too now, and refactor a bit to reduce duplication. NOTE: bonus points: we can use something like: ```ruby Rib.find_each do |rib| rib.normalize_attribute(:iban) rib.normalize_attribute(:bic) rib.normalize_attribute(:name) rib.save! # this will not trigger an update query if there are no changes^ ``` Closes #677.
- Loading branch information