1234567891011121314151617181920212223242526272829303132333435 |
- class Session < ApplicationRecord
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- belongs_to :user
-
- def self.new_token
- SecureRandom.urlsafe_base64
- end
-
- def self.digest(string)
- cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine.cost
- BCrypt::Password.create(string, cost: cost)
- end
- end
|