def check_beta_code
beta_code_array = [\'AAAAAAAAAA\', \'BBBBBBBBBB\', \'CCCCCCCCCC\', \'DDDDDDDDDD\', \'EEEEEEEEEE\']
if false == beta_code_array.include?(:bet
Look at your conditional:
beta_code_array.include?(:beta_code)
You're checking if beta_code_array
includes a symbol :beta_code
. I assume you meant to pass on a string parameter? I'm not too familiar with Rails — please correct me if this isn't the right form for the User model.
def check_beta_code beta_code
beta_code_array = ['AAAAAAAAAA', 'BBBBBBBBBB', 'CCCCCCCCCC', 'DDDDDDDDDD', 'EEEEEEEEEE']
unless beta_code_array.include?(beta_code)
errors.add(:beta_code, "Invalid Beta Code")
end
end