bump max name length to 32 characters

This commit is contained in:
Joshua Arts 2018-07-24 11:05:25 -04:00
parent 4e87dcbd64
commit d6aee4d2d1
3 changed files with 3 additions and 3 deletions

View File

@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base
protect_from_forgery with: :exception
MEETING_NAME_LIMIT = 90
USER_NAME_LIMIT = 30
USER_NAME_LIMIT = 32
# Show an information page when migration fails and there is a version error.
def migration_error?

View File

@ -7,7 +7,7 @@ class User < ApplicationRecord
has_many :rooms
belongs_to :main_room, class_name: 'Room', foreign_key: :room_id, required: false
validates :name, length: { maximum: 24 }, presence: true
validates :name, length: { maximum: 32 }, presence: true
validates :provider, presence: true
validates :image, format: { with: /\.(png|jpg)\Z/i }, allow_blank: true
validates :email, length: { maximum: 60 }, allow_blank: true,

View File

@ -9,7 +9,7 @@ describe User, type: :model do
context 'validations' do
it { should validate_presence_of(:name) }
it { should validate_length_of(:name).is_at_most(24) }
it { should validate_length_of(:name).is_at_most(32) }
it { should validate_presence_of(:provider) }