<commit_before>class ProjectsController < ApplicationController
  before_action :authenticate_user!
  # Always preload organization
  before_action :organization

  CHECKED = 1

  def index
    redirect_to new_organization_project_path(organization) unless projects.present?
    @projects = ProjectDecorator.decorate_collection(policy_scope(organization.projects))
  end

  def new
    authorize organization, :edit?
    unless organization.github_name.present?<commit_msg>Orders projects by name<commit_after>class ProjectsController < ApplicationController
  before_action :authenticate_user!
  # Always preload organization
  before_action :organization

  CHECKED = 1

  def index
    redirect_to new_organization_project_path(organization) unless projects.present?
    @projects = ProjectDecorator.decorate_collection(
      policy_scope(organization.projects.order(:name))
    )
  end

  def new
    authorize organization, :edit?
    unless organization.github_name.present?
{'fraction_non_alphanumeric': 0.059123343527013254, 'fraction_numerical': 0.0020387359836901123, 'mean_word_length': 5.335483870967742, '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': '4610869', 'n_tokens_mistral': 272, 'n_tokens_neox': 251, 'n_words': 59}