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

16 lines
349 B
Ruby
Raw Normal View History

# frozen_string_literal: true
module ModerationQueueHelper
def filter_states(**args)
2024-03-18 20:13:32 +00:00
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