<commit_before>class ImagesController < ApplicationController
  load_and_authorize_resource :image, except: [:show]
  load_resource :image, only: [:show]

  def index
    @q = Image.unscoped.includes([:collection]).search(params[:q])
    @images = @q.result(distinct: true)
    @images = @images.order('created_at DESC') if params[:q].nil?
    @images = @images.page(params[:page]).per(Image::PER_PAGE)
  end
<commit_msg>tweaks<commit_after>class ImagesController < ApplicationController
  load_and_authorize_resource :image, except: [:show]
  load_resource :image, only: [:show]

  def index
    @q = Image.unscoped.includes([:collection]).search(params[:q])
    @images = @q.result
    @images = @images.order('id DESC') if params[:q].nil?
    @images = @images.page(params[:page]).per(Image::PER_PAGE)
  end

{'fraction_non_alphanumeric': 0.15659679408138102, 'fraction_numerical': 0.0, 'mean_word_length': 5.34375, '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': '2631082', 'n_tokens_mistral': 271, 'n_tokens_neox': 268, 'n_words': 51}