demarches-normaliennes/app/models/france_connect_information.rb
2018-02-27 16:22:53 +01:00

11 lines
377 B
Ruby

class FranceConnectInformation < ActiveRecord::Base
belongs_to :user
validates :france_connect_particulier_id, presence: true, allow_blank: false, allow_nil: false
def mandataire_social?(params)
params[:nom].casecmp(family_name).zero? &&
params[:prenom].casecmp(given_name).zero? &&
params[:date_naissance_timestamp] == birthdate.to_time.to_i
end
end