Sha256: f6c745cfa74ebb031cfd73527e403314d40f51bd3a0ff9c22ab05c43971c20f1

Contents?: true

Size: 482 Bytes

Versions: 4

Compression:

Stored size: 482 Bytes

Contents

# frozen_string_literal
#
# Model concern to provide shared behaviour for password resets
#
# Automatically generated by the orthodox gem (https://github.com/katanacode/orthodox)
# (c) Copyright 2019 Katana Code Ltd. All Rights Reserved. 
module PasswordResetable
  
  extend ActiveSupport::Concern
  
  included do
    has_one :password_reset_token, as: :resetable, dependent: :destroy
  end
  
  def destroy_password_reset_token
    password_reset_token.try(:destroy)
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
orthodox-0.3.3 lib/generators/authentication/templates/models/concerns/password_resetable.rb
orthodox-0.3.2 lib/generators/authentication/templates/models/concerns/password_resetable.rb
orthodox-0.3.1 lib/generators/authentication/templates/models/concerns/password_resetable.rb
orthodox-0.3.0 lib/generators/authentication/templates/models/concerns/password_resetable.rb