Module: BookingSync::Engine::Model::ClassMethods
- Defined in:
- lib/bookingsync/engine/model.rb
Instance Method Summary collapse
Instance Method Details
#from_omniauth(auth) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/bookingsync/engine/model.rb', line 5 def from_omniauth(auth) find_or_initialize_by(uid: auth.uid, provider: auth.provider).tap do |account| account.name = auth.info.business_name account.update_token(auth.credentials) account.save! end end |