Authlogic active field to activated_at field

44 Views Asked by At

is it possible to use the activeted_at field instead of the "active" field, since I need to know the account activation date, I can fill in the activated_at field through the callback, but for example, it will not be used during authentication, but I need this field to be used, is it possible to do?

1

There are 1 best solutions below

0
max On
class User < ApplicationRecord
  def active?
    activated_at.present?
  end
end

See the documentation on magic states.