Created
March 13, 2014 21:38
-
-
Save brett-richardson/9537519 to your computer and use it in GitHub Desktop.
This file contains 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
class User | |
active_ingredients do | |
phone Phone, validate: true, unique: true | |
address Address, validate: true | |
website Url, validate: true | |
end | |
end | |
require 'phony' | |
class Phone < ActiveIngredient | |
def value | |
Phony.normalize @value | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment