mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:11:12 +08:00
UX: simplify and shorten new script flow for automations (#29178)
This commit is contained in:
@ -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) }
|
||||
|
Reference in New Issue
Block a user