From e07da7858e02309f0571428dfd754de0bc38687b Mon Sep 17 00:00:00 2001 From: f Date: Wed, 28 Feb 2024 18:27:15 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20cambiar=20a=20orden=20descendiente=20po?= =?UTF-8?q?r=20fecha=20de=20modificaci=C3=B3n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/processors/actor_moderation_processor.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 app/processors/actor_moderation_processor.rb diff --git a/app/processors/actor_moderation_processor.rb b/app/processors/actor_moderation_processor.rb new file mode 100644 index 00000000..efd12666 --- /dev/null +++ b/app/processors/actor_moderation_processor.rb @@ -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