mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-23 00:26:22 +00:00
fix: poder deseleccionar todos los fediblocks
This commit is contained in:
parent
670d6063e5
commit
7521f598a6
1 changed files with 6 additions and 8 deletions
|
@ -4,14 +4,12 @@
|
||||||
class FediblockStatesController < ApplicationController
|
class FediblockStatesController < ApplicationController
|
||||||
# Realiza cambios en las listas de bloqueo
|
# Realiza cambios en las listas de bloqueo
|
||||||
def action_on_several
|
def action_on_several
|
||||||
if fediblock_states_ids.present?
|
# Encontrar todas y deshabilitar las que no se enviaron
|
||||||
# Encontrar todas y deshabilitar las que no se enviaron
|
site.fediblock_states.all.find_each do |fediblock_state|
|
||||||
site.fediblock_states.all.find_each do |fediblock_state|
|
if fediblock_states_ids.include? fediblock_state.id
|
||||||
if fediblock_states_ids.include? fediblock_state.id
|
fediblock_state.enable! if fediblock_state.may_enable?
|
||||||
fediblock_state.enable! if fediblock_state.may_enable?
|
elsif fediblock_state.may_disable?
|
||||||
elsif fediblock_state.may_disable?
|
fediblock_state.disable!
|
||||||
fediblock_state.disable!
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue