From d586bda2a79341bf33ed16788df8008680c6dc17 Mon Sep 17 00:00:00 2001 From: chr Date: Sat, 12 Mar 2022 22:59:38 +0100 Subject: [PATCH] increase profile fields limit --- app/models/account.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/account.rb b/app/models/account.rb index 056bc9578..98a1be01d 100644 --- a/app/models/account.rb +++ b/app/models/account.rb @@ -92,7 +92,7 @@ class Account < ApplicationRecord validates_with UnreservedUsernameValidator, if: -> { local? && will_save_change_to_username? } validates :display_name, length: { maximum: 100 }, if: -> { local? && will_save_change_to_display_name? } validates :note, note_length: { maximum: 500 }, if: -> { local? && will_save_change_to_note? } - validates :fields, length: { maximum: 4 }, if: -> { local? && will_save_change_to_fields? } + validates :fields, length: { maximum: 10 }, if: -> { local? && will_save_change_to_fields? } scope :remote, -> { where.not(domain: nil) } scope :local, -> { where(domain: nil) } @@ -320,7 +320,7 @@ class Account < ApplicationRecord self[:fields] = fields end - DEFAULT_FIELDS_SIZE = 4 + DEFAULT_FIELDS_SIZE = 10 def build_fields return if fields.size >= DEFAULT_FIELDS_SIZE