<commit_before>class TransactionsController < UserActionsController

  def river
    @transactions = Transaction.sort_by_group(current_user.group).limit(25)
    render 'transactions/index.html.erb'
  end

  def history
    @transactions = Transaction.sort_by_user(current_user).limit(25)
    render 'transactions/index.html.erb'
  end

end<commit_msg>Add logic to the river and history actions in the controller to avoid rendering an entire page if the request is an xhr request.<commit_after>class TransactionsController < UserActionsController

  def river
    @transactions = Transaction.sort_by_group(current_user.group).limit(25)

    if request.xhr?
      render 'transactions/index.html.erb', layout: false
    else
      render 'transactions/index.html.erb'
    end
  end

  def history
    @transactions = Transaction.sort_by_user(current_user).limit(25)
    if request.xhr?
      render 'transactions/index.html.erb', layout: false
    else
      render 'transactions/index.html.erb'
    end
  end

end
{'fraction_non_alphanumeric': 0.0800395256916996, 'fraction_numerical': 0.007905138339920948, 'mean_word_length': 3.9174757281553396, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1357222', 'n_tokens_mistral': 310, 'n_tokens_neox': 300, 'n_words': 74}