theseus/app/models/concerns/can_be_batched.rb
2025-05-31 23:25:41 -04:00

10 lines
222 B
Ruby

module CanBeBatched
extend ActiveSupport::Concern
included do
belongs_to :batch, optional: true
scope :in_batch, -> { where.not(batch_id: nil) }
scope :not_in_batch, -> { where(batch_id: nil) }
end
end