We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad946fc commit bb97997Copy full SHA for bb97997
app/controllers/application_controller.rb
@@ -47,7 +47,7 @@ def seo_filter
47
48
def set_account_last_seen
49
# Update last seen only once a day to avoid too many database update
50
- if Date.today - current_account.last_seen_on >= 1
+ if current_account.last_seen_on.nil? || Date.today - current_account.last_seen_on >= 1
51
# Use update_columns to ensure updated_at value is not changed with this
52
# automatic update
53
current_account.update_columns(last_seen_on: Date.today);
0 commit comments