<commit_before>require_dependency 'francis_cms/francis_cms_controller'

module FrancisCms
  class ArchivesController < FrancisCmsController
    def index
      @years = parent_class.years
    end

    def show
      year

      @results = parent_class.for_year(@year)
    end

    private

    def parent_class
      @parent_class ||= "FrancisCms::#{resource_type.classify}".constantize
    end

    def year
      @year ||= params[:year]
    end
  end
end<commit_msg>Remove year method.<commit_after>require_dependency 'francis_cms/francis_cms_controller'

module FrancisCms
  class ArchivesController < FrancisCmsController
    def index
      @years = parent_class.years
    end

    def show
      @year = params[:year]
      @results = parent_class.for_year(@year)
    end

    private

    def parent_class
      @parent_class ||= "FrancisCms::#{resource_type.classify}".constantize
    end
  end
end
{'fraction_non_alphanumeric': 0.07836644591611479, 'fraction_numerical': 0.0, 'mean_word_length': 3.199074074074074, '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': '2135026', 'n_tokens_mistral': 298, 'n_tokens_neox': 279, 'n_words': 59}