<commit_before>require_dependency 'renalware/drugs'

module Renalware
  module Drugs
    class DrugsController < BaseController

      include Renalware::Concerns::Pageable

      before_filter :prepare_drugs_search, only: [:index]
      before_filter :prepare_paging, only: [:index]

      def selected_drugs
        @selected_drugs = Drug.for(params[:medication_switch])
        authorize @selected_drugs

        respond_to do |format|
          format.html
          format.json { render :json => @selected_drugs.as_json(:only => [:id, :name]) }
        end
      end

      def new
        @drug = Drug.new
        authorize @drug

        @drug_types = Type.all
      end
<commit_msg>Formatting<commit_after>require_dependency 'renalware/drugs'

module Renalware
  module Drugs
    class DrugsController < BaseController
      include Renalware::Concerns::Pageable

      before_filter :prepare_drugs_search, only: :index
      before_filter :prepare_paging, only: :index

      def selected_drugs
        @selected_drugs = Drug.for(params[:medication_switch])
        authorize @selected_drugs

        respond_to do |format|
          format.html
          format.json { render :json => @selected_drugs.as_json(:only => [:id, :name]) }
        end
      end

      def new
        @drug = Drug.new
        authorize @drug

        @drug_types = Type.all
      end

{'fraction_non_alphanumeric': 0.08454810495626822, 'fraction_numerical': 0.0, 'mean_word_length': 2.5755208333333335, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '6981373', 'n_tokens_mistral': 429, 'n_tokens_neox': 403, 'n_words': 92}