Skip to content

Commit ebdf6c3

Browse files
committed
Remove memoization from last_authenticated_at
1 parent fc36b85 commit ebdf6c3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/models/user_session.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,10 +113,6 @@ def user_is_unlocked
113113
#
114114
# @return [ActiveSupport::TimeWithZone, nil]
115115
def last_authenticated_at
116-
return @last_authenticated_at if defined?(@last_authenticated_at)
117-
118-
@last_authenticated_at = logins.max_by(&:created_at)&.created_at
119-
120-
@last_authenticated_at
116+
logins.max_by(&:created_at)&.created_at
121117
end
122118
end

0 commit comments

Comments
 (0)