<commit_before>class HomeController < ApplicationController
  def index
    @no_sidebar = true
    render :index and return unless login?

    @no_sidebar = false
    @items = current_user.following_items.page(params[:page])
    @items = Item.order_by(updated_at: -1).page(params[:page]) if @items.empty?
    render :home
  end

  def help
    @no_sidebar = true
  end

  def search
    @items = Item.search(params[:query]).to_a
  end
end<commit_msg>fix counting @items at home#home<commit_after>class HomeController < ApplicationController
  def index
    @no_sidebar = true
    render :index and return unless login?

    @no_sidebar = false
    @items = current_user.following_items.page(params[:page])
    @items = Item.order_by(updated_at: -1).page(params[:page]) if @items.count < 1
    render :home
  end

  def help
    @no_sidebar = true
  end

  def search
    @items = Item.search(params[:query]).to_a
  end
end
{'fraction_non_alphanumeric': 0.10412147505422993, 'fraction_numerical': 0.0032537960954446853, 'mean_word_length': 3.5920398009950247, 'pattern_counts': {'":': 0, '<': 6, '<?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': '7228963', 'n_tokens_mistral': 300, 'n_tokens_neox': 290, 'n_words': 76}