class Ditty::IdentityPolicy
Public Instance Methods
forgot_password?()
click to toggle source
# File lib/ditty/policies/identity_policy.rb, line 11 def forgot_password? true end
login?()
click to toggle source
# File lib/ditty/policies/identity_policy.rb, line 7 def login? true end
permitted_attributes()
click to toggle source
# File lib/ditty/policies/identity_policy.rb, line 19 def permitted_attributes %i[username password password_confirmation] end
reset_password?()
click to toggle source
# File lib/ditty/policies/identity_policy.rb, line 15 def reset_password? record.new? || (record.reset_requested && record.reset_requested > (Time.now - (24 * 60 * 60))) end