Fix the build.
This commit is contained in:
parent
0ed2834c2d
commit
50e59fb9bd
|
@ -1,10 +1,6 @@
|
||||||
class UserSecondFactor < ActiveRecord::Base
|
class UserSecondFactor < ActiveRecord::Base
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
|
|
||||||
scope :totp, -> do
|
|
||||||
where(method: UserSecondFactor.methods[:totp])
|
|
||||||
end
|
|
||||||
|
|
||||||
scope :backup_codes, -> do
|
scope :backup_codes, -> do
|
||||||
where(method: UserSecondFactor.methods[:backup_codes], enabled: true)
|
where(method: UserSecondFactor.methods[:backup_codes], enabled: true)
|
||||||
end
|
end
|
||||||
|
@ -16,6 +12,10 @@ class UserSecondFactor < ActiveRecord::Base
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.totp
|
||||||
|
where(method: self.methods[:totp]).first
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# == Schema Information
|
# == Schema Information
|
||||||
|
|
Loading…
Reference in New Issue