Remove SiteConfig From Org Validation (#5393) [deploy]

* Make default_site_email readonly so Rails can load first

* Change Org validation message and remove readonly so configs can be updated

* Change Org validation message and remove readonly so configs can be updated TRY 2
This commit is contained in:
Molly Struve 2020-01-07 18:04:13 -05:00 committed by Ben Halpern
parent 728a05c476
commit d039a61177

View file

@ -33,7 +33,7 @@ class Organization < ApplicationRecord
format: { with: /\A[a-zA-Z0-9\-_]+\Z/ },
length: { in: 2..18 },
exclusion: { in: ReservedWords.all,
message: "%<value>s is a reserved word. Contact #{SiteConfig.default_site_email} for help registering your organization." }
message: "%<value>s is a reserved word. Contact site admins for help registering your organization." }
validates :url, url: { allow_blank: true, no_local: true, schemes: %w[https http] }
validates :secret, uniqueness: { allow_blank: true }
validates :location, :email, :company_size, length: { maximum: 64 }