Class: BotMob::Install

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/bot_mob/install.rb

Class Method Summary collapse

Class Method Details

.create_with_ambassador(auth) ⇒ Object



6
7
8
9
10
11
# File 'lib/bot_mob/install.rb', line 6

def self.create_with_ambassador(auth)
  where(external_id: auth.external_id).first_or_initialize.tap do |i|
    i.token = auth.token
    i.save!
  end
end