<commit_before>class EntriesController < ApplicationController
  include EntriesHelper

  before_filter { entries_context }

  def index
  end

  def show
  end

  def next
    next_entry = @entries.select('entries.id')
      .where(
        '(entries.published = :published AND entries.id < :id) OR entries.published < :published',
        {published: @entry.published, id: @entry.id})
      .limit(1)
      .first
    redirect_to polymorphic_path([@parent, next_entry], @filters)
  rescue ArgumentError<commit_msg>mark entry as read on show<commit_after>class EntriesController < ApplicationController
  include EntriesHelper

  before_filter { entries_context }

  def index
  end

  def show
    @entry.userstate(current_user).update(seen: true)
  end

  def next
    next_entry = @entries.select('entries.id')
      .where(
        '(entries.published = :published AND entries.id < :id) OR entries.published < :published',
        {published: @entry.published, id: @entry.id})
      .limit(1)
      .first
    redirect_to polymorphic_path([@parent, next_entry], @filters)
  rescue ArgumentError
{'fraction_non_alphanumeric': 0.10191082802547771, 'fraction_numerical': 0.0018198362147406734, 'mean_word_length': 3.4715447154471546, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, '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': '4995389', 'n_tokens_mistral': 332, 'n_tokens_neox': 317, 'n_words': 82}