forked from External/greenlight
John fix issue#274 (#275)
* <fixed privacy policy errors> * <Fixed code style> * <Robustness changes> * <redirect to 404 page if terms are disabled> * <patched validation of accepted terms> * <relaunching scrutinizer>
This commit is contained in:
@ -35,7 +35,8 @@ class User < ApplicationRecord
|
||||
validates :password, length: { minimum: 6 }, confirmation: true, if: :greenlight_account?, on: :create
|
||||
|
||||
# Bypass validation if omniauth
|
||||
validates :accepted_terms, acceptance: true, unless: proc { !greenlight_account? }
|
||||
validates :accepted_terms, acceptance: true,
|
||||
unless: -> { !greenlight_account? || !Rails.configuration.terms }
|
||||
|
||||
# We don't want to require password validations on all accounts.
|
||||
has_secure_password(validations: false)
|
||||
|
Reference in New Issue
Block a user