5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-12-01 09:06:23 +00:00
panel/app/processors/actor_moderation_processor.rb

14 lines
354 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
# Gestiona los filtros de ActorModeration
class ActorModerationProcessor < Rubanok::Processor
# En orden descendiente para encontrar le últime Actor
prepare do
raw.order(updated_at: :desc)
end
map :actor_state, activate_always: true do |actor_state: 'paused'|
raw.where(aasm_state: actor_state)
end
end