UX: simplify and shorten new script flow for automations (#29178)

This commit is contained in:
Kris
2024-10-23 14:04:17 -04:00
committed by GitHub
parent b7f76d99e8
commit d471c01ff6
17 changed files with 210 additions and 168 deletions

View File

@ -30,9 +30,8 @@ module DiscourseAutomation
@running_in_background = true
end
MIN_NAME_LENGTH = 5
MAX_NAME_LENGTH = 100
validates :name, length: { in: MIN_NAME_LENGTH..MAX_NAME_LENGTH }
validates :name, length: { maximum: MAX_NAME_LENGTH }
def add_id_to_custom_field(target, custom_field_key)
if ![Topic, Post, User].any? { |m| target.is_a?(m) }