Class: Authentication

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

Instance Method Summary collapse

Instance Method Details

#secretObject



16
17
18
# File 'app/models/authentication.rb', line 16

def secret
 encryption.secret || nil
end

#secret=(secret) ⇒ Object



12
13
14
# File 'app/models/authentication.rb', line 12

def secret=(secret)
  encryption.nil? ? self.encryption = Encryption.new(:secret => secret) : encryption.update(:secret => secret)
end