Sha256: 2037a5e6c2cead65be4a727f5464fb3793448dfbeeb36ac486bee1f91c511914

Contents?: true

Size: 366 Bytes

Versions: 7

Compression:

Stored size: 366 Bytes

Contents

class User < ApplicationRecord
  # Include default devise modules. Others available are:
  # :confirmable, :lockable, :timeoutable and :omniauthable
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable

  has_many :publickeys
  
  before_save do
    self.token = SecureRandom.hex if !self.token
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
meroku-2.0.7 frontend/app/models/user.rb
meroku-2.0.6 frontend/app/models/user.rb
meroku-2.0.5 frontend/app/models/user.rb
meroku-2.0.4 frontend/app/models/user.rb
meroku-2.0.3 frontend/app/models/user.rb
meroku-2.0.2 frontend/app/models/user.rb
meroku-2.0.1 frontend/app/models/user.rb