module Sidekiq::Apriori::Arb

Public Class Methods

included(base) click to toggle source
# File lib/sidekiq-apriori/arb.rb, line 3
def self.included(base)

  if defined?(ActiveRecord::Base) && base < ActiveRecord::Base
    require 'sidekiq-apriori/arb'
    base.extend ClassMethods

    ## Add validation for priority attribute
    if base.attribute_names.include?('priority')
      base.validates_inclusion_of :priority, :in => PRIORITIES
    end
  end
end