Module: Bento::Models::Modules::Validations

Defined in:
lib/bento/models/modules/validations.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
# File 'lib/bento/models/modules/validations.rb', line 5

def self.included(base)
  base.class_eval do
    validates_presence_of :name
    validates_uniqueness_of :name, :allow_blank => true
  end
end