mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 23:56:22 +00:00
feat: cambiar a orden descendiente por fecha de modificación
This commit is contained in:
parent
6d9a64f728
commit
e07da7858e
1 changed files with 13 additions and 0 deletions
13
app/processors/actor_moderation_processor.rb
Normal file
13
app/processors/actor_moderation_processor.rb
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
# 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 |state: 'paused'|
|
||||||
|
raw.where(aasm_state: state)
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in a new issue