Fix the build.

This commit is contained in:
Guo Xiang Tan 2018-07-16 10:12:19 +08:00
parent 0ed2834c2d
commit 50e59fb9bd
1 changed files with 4 additions and 4 deletions

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