increase profile fields limit

This commit is contained in:
khr 2022-03-12 22:59:38 +01:00
parent bb420ed0bb
commit d586bda2a7
1 changed files with 2 additions and 2 deletions

View File

@ -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