Sha256: 6627e6115adc8395bddf304f1134810663ff3e0bae3b61f1aa50f657695877ff
Contents?: true
Size: 254 Bytes
Versions: 2
Compression:
Stored size: 254 Bytes
Contents
module GreenEggsAndSpam class AntiSpamValidator < ActiveModel::Validator def validate(record) record.errors.add :base, GreenEggsAndSpam.options[:error_message] unless GreenEggsAndSpam.validates?(record.antispam) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
green_eggs_and_spam-0.2.1 | lib/green_eggs_and_spam/anti_spam_validator.rb |
green_eggs_and_spam-0.2.0 | lib/green_eggs_and_spam/anti_spam_validator.rb |