Sha256: adfdf9a54b66c1b1a892e0d8381957de5ded241c606f4abf6cb4ae13e32e405b
Contents?: true
Size: 435 Bytes
Versions: 4
Compression:
Stored size: 435 Bytes
Contents
module Levtera::Concerns module Make extend ActiveSupport::Concern included do include Provided VEHICLE_TYPES = %w(motorcycle car) field :name, type: String field :vehicle_type, type: String has_many :models validates :name, presence: true validates :vehicle_type, inclusion: { in: VEHICLE_TYPES } validates :provider_id, uniqueness: { allow_nil: true } end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
levtera-0.2.6 | lib/levtera/concerns/make.rb |
levtera-0.2.5 | lib/levtera/concerns/make.rb |
levtera-0.2.4 | lib/levtera/concerns/make.rb |
levtera-0.2.3 | lib/levtera/concerns/make.rb |