2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

Fix the build.

This commit is contained in:
Guo Xiang Tan 2018-07-16 10:12:19 +08:00
parent 0ed2834c2d
commit 50e59fb9bd

View file

@ -1,10 +1,6 @@
class UserSecondFactor < ActiveRecord::Base
belongs_to :user
scope :totp, -> do
where(method: UserSecondFactor.methods[:totp])
end
scope :backup_codes, -> do
where(method: UserSecondFactor.methods[:backup_codes], enabled: true)
end
@ -16,6 +12,10 @@ class UserSecondFactor < ActiveRecord::Base
)
end
def self.totp
where(method: self.methods[:totp]).first
end
end
# == Schema Information