5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-24 10:36:22 +00:00
panel/app/helpers/moderation_queue_helper.rb

15 lines
349 B
Ruby

# frozen_string_literal: true
module ModerationQueueHelper
def filter_states(**args)
params.permit(:instance_state, :actor_state, :activity_pub_state).merge(**args)
end
def active?(states, state_name, state)
if params[state_name].present?
params[state_name] == state.to_s
else
states.first == state
end
end
end