Sha256: 8e694774f39bf1dcaa0a83b493d1f84493316ffac546c6e2dbc17e32ebe86edc

Contents?: true

Size: 587 Bytes

Versions: 1

Compression:

Stored size: 587 Bytes

Contents

# frozen_string_literal: true

module Devise
  module Models
    module Compatibility
      extend ActiveSupport::Concern

      # for backwards compatibility with Rails < 5.1.x
      unless Devise.activerecord51?
        def saved_change_to_encrypted_password?
          encrypted_password_changed?
        end

        def encrypted_password_before_last_save
          previous_changes['encrypted_password'].try(:first)
        end

        def will_save_change_to_encrypted_password?
          changed_attributes['encrypted_password'].present?
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
devise-security-0.13.0 lib/devise-security/models/compatibility.rb