Sha256: e4bd639470cdc4d0a61dae6dba325b79f408d4b81b64b53aa8067a8ec3bd922f

Contents?: true

Size: 291 Bytes

Versions: 2

Compression:

Stored size: 291 Bytes

Contents

module Bento
  module Models
    module Modules
      module Validations
        def self.included(base)
          base.class_eval do
            validates_presence_of :name
            validates_uniqueness_of :name, :allow_blank => true
          end
        end
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
bento-0.0.3 lib/bento/models/modules/validations.rb
bento-0.0.2 lib/bento/models/modules/validations.rb