forked from External/greenlight
bump max name length to 32 characters
This commit is contained in:
parent
4e87dcbd64
commit
d6aee4d2d1
|
@ -11,7 +11,7 @@ class ApplicationController < ActionController::Base
|
||||||
protect_from_forgery with: :exception
|
protect_from_forgery with: :exception
|
||||||
|
|
||||||
MEETING_NAME_LIMIT = 90
|
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.
|
# Show an information page when migration fails and there is a version error.
|
||||||
def migration_error?
|
def migration_error?
|
||||||
|
|
|
@ -7,7 +7,7 @@ class User < ApplicationRecord
|
||||||
has_many :rooms
|
has_many :rooms
|
||||||
belongs_to :main_room, class_name: 'Room', foreign_key: :room_id, required: false
|
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 :provider, presence: true
|
||||||
validates :image, format: { with: /\.(png|jpg)\Z/i }, allow_blank: true
|
validates :image, format: { with: /\.(png|jpg)\Z/i }, allow_blank: true
|
||||||
validates :email, length: { maximum: 60 }, allow_blank: true,
|
validates :email, length: { maximum: 60 }, allow_blank: true,
|
||||||
|
|
|
@ -9,7 +9,7 @@ describe User, type: :model do
|
||||||
|
|
||||||
context 'validations' do
|
context 'validations' do
|
||||||
it { should validate_presence_of(:name) }
|
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) }
|
it { should validate_presence_of(:provider) }
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue