Created
November 1, 2012 22:31
-
-
Save gohuygo/3997136 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #strip phone number in partner_restaurant of non-numeric values | |
| formatted_phone = SunspotHelper.sanitize_term(pr.phone).gsub(/\s+/, "") | |
| #When iterating through each restaurant in DB, | |
| #I want to strip all contact_phone of non-numeric values as well before checking against formatted_phone | |
| Restaurant.where(contact_phone: formatted_phone).each do |r| | |
| #irrelevant code | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment