updated screen name validator

This commit is contained in:
Andreas N 2015-01-16 23:31:02 +01:00
parent 74e74dedef
commit ec62fea665

View file

@ -1,7 +1,8 @@
class ScreenNameValidator < ActiveModel::EachValidator
FORBIDDEN_SCREEN_NAMES = %w(justask_admin retrospring_admin admin justask retrospring support about public
notifications inbox sign_in sign_up sidekiq moderation moderator mod administrator
siteadmin site_admin help retro_spring retroospring retrosprlng niisding nllsding)
siteadmin site_admin help retro_spring retroospring retrosprlng niisding nllsding
pixeidesu terms privacy help)
def validate_each(record, attribute, value)
if FORBIDDEN_SCREEN_NAMES.include? value.downcase