From 7521f598a64df25daac30501029d21171d48f7b1 Mon Sep 17 00:00:00 2001 From: f Date: Wed, 28 Feb 2024 15:45:58 -0300 Subject: [PATCH] fix: poder deseleccionar todos los fediblocks --- app/controllers/fediblock_states_controller.rb | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/app/controllers/fediblock_states_controller.rb b/app/controllers/fediblock_states_controller.rb index c116b75a..6d9737c3 100644 --- a/app/controllers/fediblock_states_controller.rb +++ b/app/controllers/fediblock_states_controller.rb @@ -4,14 +4,12 @@ class FediblockStatesController < ApplicationController # Realiza cambios en las listas de bloqueo def action_on_several - if fediblock_states_ids.present? - # Encontrar todas y deshabilitar las que no se enviaron - site.fediblock_states.all.find_each do |fediblock_state| - if fediblock_states_ids.include? fediblock_state.id - fediblock_state.enable! if fediblock_state.may_enable? - elsif fediblock_state.may_disable? - fediblock_state.disable! - end + # Encontrar todas y deshabilitar las que no se enviaron + site.fediblock_states.all.find_each do |fediblock_state| + if fediblock_states_ids.include? fediblock_state.id + fediblock_state.enable! if fediblock_state.may_enable? + elsif fediblock_state.may_disable? + fediblock_state.disable! end end