Sha256: bc6f5c9f7f0f95c8f1a67bec9623038dab5295266909d37c55bbb510905ec1e8
Contents?: true
Size: 803 Bytes
Versions: 16
Compression:
Stored size: 803 Bytes
Contents
module Ecom module Core class LookaheadPlanReviewTime < ApplicationRecord include AASM belongs_to :lookahead_plan validates :lookahead_plan_id, :lookahead_plan, :lookahead_plan_revision_number, :review_time, :status, presence: true validates_numericality_of :lookahead_plan_revision_number, greater_than_or_equal_to: 0 aasm column: 'status' do state :awaiting, initial: true state :attended state :cancelled event :attend do transitions from: :awaiting, to: :attended, guard: -> { status == 'awaiting' } end event :cancel do transitions from: :awaiting, to: :cancelled, guard: -> { status == 'awaiting' } end end end end end
Version data entries
16 entries across 16 versions & 1 rubygems