demarches-normaliennes/app/models/administration.rb

10 lines
370 B
Ruby
Raw Normal View History

2016-02-23 16:51:24 +01:00
class Administration < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
2017-12-20 15:27:33 +01:00
devise :database_authenticatable, :rememberable, :trackable, :validatable, :omniauthable, omniauth_providers: [:github]
def self.from_omniauth(params)
find_by(email: params["info"]["email"])
end
2016-02-23 16:51:24 +01:00
end