From e2fc128c16be710e230364a917ef807b6e6b0ded Mon Sep 17 00:00:00 2001 From: juandefelix Date: Sun, 13 Sep 2015 11:11:11 -0500 Subject: [PATCH] passing validations by adding terms_of_service to attributes hash --- app/models/user.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/models/user.rb b/app/models/user.rb index 3ddf4df54..35fe011a6 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -68,7 +68,8 @@ class User < ActiveRecord::Base user = User.new( username: auth.info.nickname || auth.extra.raw_info.name.parameterize('-') || auth.uid, email: email ? email : "#{OMNIAUTH_EMAIL_PREFIX}-#{auth.uid}-#{auth.provider}.com", - password: Devise.friendly_token[0,20] + password: Devise.friendly_token[0,20], + terms_of_service: '1' ) user.skip_confirmation! user.save!