add to controller and helper

This commit is contained in:
Pia B
2026-06-08 18:24:30 +02:00
parent 828590530e
commit 11f268b2c5
2 changed files with 4 additions and 0 deletions

View File

@@ -17,12 +17,14 @@ module Admin
authorize @tag, :show?
@time_period = report_range
@action_logs = Admin::ActionLogFilter.new(action_type: :update_tag).results.limit(5)
end
def update
authorize @tag, :update?
if @tag.update(tag_params.merge(reviewed_at: Time.now.utc))
log_action :update, @tag
redirect_to admin_tag_path(@tag.id), notice: I18n.t('admin.tags.updated_msg')
else
@time_period = report_range

View File

@@ -37,6 +37,8 @@ module Admin::ActionLogsHelper
end
when 'Relay'
link_to log.human_identifier, admin_relays_path
when 'Tag'
link_to log.human_identifier, admin_tags_path
end
end