dailypenn / eventsatpenn

Penn campus events aggregation website with Facebook integration
0 stars 0 forks source link

Signup fails when user has no Facebook email #79

Closed alexwgraves closed 7 years ago

alexwgraves commented 7 years ago

So an email isn't technically necessary for our service, but we set it as a required field. There are two solutions here: remove the email presence validation (easiest) or direct users to a page to add their email if their Facebook doesn't have one.

Sentry info: https://sentry.io/dailypenn/eventspenn/issues/334671073/

ActiveRecord::RecordInvalid: Validation failed: Email can't be blank
  app/models/user.rb:8:in `create_with_omniauth'
    create! do |user|
  app/controllers/sessions_controller.rb:9:in `create'
    uid: auth['uid'].to_s).first || User.create_with_omniauth(auth)
...
(82 additional frame(s) were not displayed)

ActiveRecord::RecordInvalid: Validation failed: Email can't be blank
alexwgraves commented 7 years ago

We're going to remove the email validation.