Class: Cadinsor::ClientApp

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/cadinsor/client_app.rb

Instance Method Summary collapse

Instance Method Details

#generate_secret!Object



6
7
8
9
10
# File 'app/models/cadinsor/client_app.rb', line 6

def generate_secret!
  self.secret = SecureRandom.urlsafe_base64(32)
  generate_secret! if ClientApp.find_by_secret(self.secret)
  self
end