2
0

Add ability to reorder server rules from admin interface (#34737)

This commit is contained in:
Claire
2025-05-20 14:49:11 +02:00
committed by GitHub
parent 8ed0408adb
commit d7cb6068b1
12 changed files with 97 additions and 2 deletions

View File

@@ -50,6 +50,22 @@ module Admin
redirect_to admin_rules_path
end
def move_up
authorize @rule, :update?
@rule.move!(-1)
redirect_to admin_rules_path
end
def move_down
authorize @rule, :update?
@rule.move!(+1)
redirect_to admin_rules_path
end
private
def set_rule