class Banana < ActiveModel::Base
class InvalidBananaColor < Errata::InclusionInvalidation
default_message do
"must be one of the following: #{valid_values.join(',')}"
end
end
validate_inclusion_of :color, in: %w(green yellow), message: InvalidBananaColor
end
-
Notifications
You must be signed in to change notification settings - Fork 0
License
phildarnowsky/errata
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published