Last active
August 29, 2015 14:23
-
-
Save ajbeach2/565ec85f31c4920effa2 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 Domain < ActiveRecord::Base | |
validate :valid_domain, on: :create | |
def valid_domain | |
errors.add(:name, "domain is not valid!") unless my_domain_check_methond(name) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment