<commit_before>class CropsController < ApplicationController
  load_and_authorize_resource
  skip_authorize_resource :only => :hierarchy

  cache_sweeper :crop_sweeper

  # GET /crops
  # GET /crops.json
  def index
    @crops = Crop.includes(:scientific_names, {:plantings => :photos}).paginate(:page => params[:page])

    respond_to do |format|
      format.html 
      format.json { render :json => @crops }
      format.rss { render :layout => false }
      format.csv do
        @filename = "Growstuff-Crops-#{Time.zone.now.to_s(:number)}.csv"
        @crops = Crop.includes(:scientific_names, :plantings, :seeds, :creator)
        render :csv => @crops
      end
    end
  end

  # GET /crops/wrangle
  def wrangle
    @crops = Crop.recent.paginate(:page => params[:page])

    respond_to do |format|
      format.html
    end
  end

  # GET /crops/hierarchy
  def hierarchy<commit_msg>Adjusted crops.rss to show most recent<commit_after>class CropsController < ApplicationController
  load_and_authorize_resource
  skip_authorize_resource :only => :hierarchy

  cache_sweeper :crop_sweeper

  # GET /crops
  # GET /crops.json
  def index
    @crops = Crop.includes(:scientific_names, {:plantings => :photos}).paginate(:page => params[:page])

    respond_to do |format|
      format.html 
      format.json { render :json => @crops }
      format.rss do
        @crops = Crop.recent.includes(:scientific_names, :creator)
        render :rss => @crops
      end
      format.csv do
        @filename = "Growstuff-Crops-#{Time.zone.now.to_s(:number)}.csv"
        @crops = Crop.includes(:scientific_names, :plantings, :seeds, :creator)
        render :csv => @crops
      end
    end
  end

  # GET /crops/wrangle
  def wrangle
    @crops = Crop.recent.paginate(:page => params[:page])

    respond_to do |format|
      format.html
    end
  end

  # GET /crops/hierarchy
  def hierarchy
{'fraction_non_alphanumeric': 0.1167459059693608, 'fraction_numerical': 0.0, 'mean_word_length': 2.970649895178197, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '6869233', 'n_tokens_mistral': 661, 'n_tokens_neox': 623, 'n_words': 137}