Module: Sidekiq::Apriori::Arb::ClassMethods
- Defined in:
- lib/sidekiq-apriori/arb.rb
Instance Method Summary collapse
-
#prioritize(options = {}, &block) ⇒ Object
Declarative hook to prioritize instances.
Instance Method Details
#prioritize(options = {}, &block) ⇒ Object
Declarative hook to prioritize instances
19 20 21 22 23 24 |
# File 'lib/sidekiq-apriori/arb.rb', line 19 def prioritize( = {}, &block) method = ( block_given? && [-1, 0].include?(block.arity) ) ? block : ( [:using] || [:with] ) before_validation method, :on => :create end |