Sha256: 349415f43981052198d37fb78b146f86fae99b8c80fc757b0791f3b487e6f1dc
Contents?: true
Size: 394 Bytes
Versions: 8
Compression:
Stored size: 394 Bytes
Contents
module Ecom module Core class Crew < ApplicationRecord PERMANENT = 'Permanent'.freeze TEMPORARY = 'Temporary'.freeze belongs_to :crew_type validates :name, :qualification, presence: true validates :wage, presence: true, if: ->(o) { o.employment == PERMANENT } validates :wage, absence: true, if: ->(o) { o.employment == TEMPORARY } end end end
Version data entries
8 entries across 8 versions & 1 rubygems