Class: BotMob::Install
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BotMob::Install
- Defined in:
- lib/bot_mob/install.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.create_with_auth(auth) ⇒ Object
6 7 8 9 10 11 |
# File 'lib/bot_mob/install.rb', line 6 def self.create_with_auth(auth) where(external_id: auth[:external_id]).first_or_initialize.tap do |i| i.token = auth[:token] i.save! end end |
Instance Method Details
#auth ⇒ Object
13 14 15 |
# File 'lib/bot_mob/install.rb', line 13 def auth { external_id: external_id, token: token } end |