Sha256: dbe2352a074ae510a8d98021122d57095d38aae5819f14e0f95c2b531a4348bc

Contents?: true

Size: 553 Bytes

Versions: 2

Compression:

Stored size: 553 Bytes

Contents

class Bravo < ApplicationRecord
  validates :a_string, length: { minimum: 5 }
  validates :an_integer, numericality: { greater_than: 1_000 }
  validates :a_unique_value, uniqueness: true, numericality: { in: 1..2 }, allow_nil: true
  validates :a_string_from_options, inclusion: { in: %w[foo bar zed] }
  validates :an_integer_from_options, inclusion: { in: [15, 30, 45] }
  validates :an_absent_value, absence: true
  validates :a_regex, format: { with: /\w{10}@(hotmail|gmail)\.com/ }

  enum an_enum: [ :foo, :bar ]

  serialize :an_array, Array
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
dirty_seed-0.2.1 spec/dummy/app/models/bravo.rb
dirty_seed-0.2.0 spec/dummy/app/models/bravo.rb