Skip to content

phildarnowsky/errata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

errata - multiple representations of Rails errors

Usage

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published