Skip to content

Instantly share code, notes, and snippets.

@ajbeach2
Last active August 29, 2015 14:23
Show Gist options
  • Save ajbeach2/565ec85f31c4920effa2 to your computer and use it in GitHub Desktop.
Save ajbeach2/565ec85f31c4920effa2 to your computer and use it in GitHub Desktop.
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