demarches-normaliennes/app/models/france_connect_information.rb
Pierre de La Morinerie 11456109c0 models: explicitly mark optional belongs_to relationship as so
This prepares making the `belongs_to` relationship required by default.
2020-08-18 15:57:36 +02:00

21 lines
746 B
Ruby

# == Schema Information
#
# Table name: france_connect_informations
#
# id :integer not null, primary key
# birthdate :date
# birthplace :string
# email_france_connect :string
# family_name :string
# gender :string
# given_name :string
# created_at :datetime
# updated_at :datetime
# france_connect_particulier_id :string
# user_id :integer
#
class FranceConnectInformation < ApplicationRecord
belongs_to :user, optional: true
validates :france_connect_particulier_id, presence: true, allow_blank: false, allow_nil: false
end