mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 20:06:22 +00:00
23 lines
547 B
Ruby
23 lines
547 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
# Gestiona acciones de moderación
|
||
|
class ActivityPubsController < ApplicationController
|
||
|
ActivityPub.events.each do |event|
|
||
|
define_method(event) do
|
||
|
activity_pub.public_send(:"#{event}!") if activity_pub.public_send(:"may_#{event}?")
|
||
|
|
||
|
redirect_back fallback_location: site_moderation_queue_path(**(session[:moderation_queue_filters] || {}))
|
||
|
end
|
||
|
end
|
||
|
|
||
|
def action_on_several
|
||
|
|
||
|
end
|
||
|
|
||
|
private
|
||
|
|
||
|
def activity_pub
|
||
|
@activity_pub ||= site.activity_pubs.find(params[:activity_pub_id])
|
||
|
end
|
||
|
end
|