Module: Sidekiq::Apriori::Arb
- Defined in:
- lib/sidekiq-apriori/arb.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 14 |
# 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 |