app/workers/seasonal_offers_worker.rb
# check seasonal_pending offers and force-approve them. No callbacks, so
# the logic_version stays the same (might be outdated). Also approved_at and
# approved_by don't get overwritten, which is good!
check seasonal_pending offers and force-approve them. No callbacks, so
the logic_version stays the same (might be outdated). Also approved_at and
approved_by don't get overwritten, which is good!
check seasonal_pending offers and force - approve them . No callbacks so the logic_version stays the same ( might be outdated ) . Also approved_at and approved_by don ' t get overwritten which is good!
def process_seasonal_pending_offers today
    Offer.where(aasm_state: 'seasonal_pending')
         .where('starts_at <= ?', today).find_each do |offer|
      offer.update_columns aasm_state: 'approved'
      offer.index!
    end
  end
def process_seasonal_pending_offers today Offer . where ( aasm_state : 'seasonal_pending' ) . where ( 'starts_at <= ?' , today ) . find_each do | offer | offer . update_columns aasm_state : 'approved' offer . index! end end
check seasonal_pending offers and force-approve them.
check seasonal_pending offers and force - approve them .
today
<not_specific>