<commit_before>module LastSeen
  extend ActiveSupport::Concern

  included do
    hide_action :update_last_seen_at
    before_filter :update_last_seen_at, if: ->() { signed_in? }
  end

  def update_last_seen_at
    last_seen_at = session[:last_seen_at]
    if last_seen_at.nil? || last_seen_at > 5.minutes.ago
      time = Time.now
      session[:last_seen_at] = time
      current_user.last_seen_at = time
      current_user.save
    end
  end
end<commit_msg>Dont bother with session cookies for tracking last_seen<commit_after>module LastSeen
  extend ActiveSupport::Concern

  included do
    hide_action :update_last_seen_at
    before_filter :update_last_seen_at, if: ->() { signed_in? }
  end

  def update_last_seen_at
    if current_user.last_seen_at.nil? || current_user.last_seen_at < 5.minutes.ago
      current_user.last_seen_at = Time.now
      current_user.save
    end
  end
end
{'fraction_non_alphanumeric': 0.07270693512304251, 'fraction_numerical': 0.0022371364653243847, 'mean_word_length': 3.7354497354497354, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2748311', 'n_tokens_mistral': 316, 'n_tokens_neox': 305, 'n_words': 62}