<commit_before>class StreetSweepsController < ApplicationController

  def search
    respond_to do |format|
      if params[:ward_id] && !params[:section]
        format.json { render json: StreetSweep.sections_by_ward(params[:ward_id]) }
      else
        format.html do
          @schedules = StreetSweep.schedules(params[:ward_id], params[:section])
          render "dashboard/show"
        end
      end
    end
  end

  def show
    @schedules = StreetSweep.find_by(ward_id: params[:id])
    render "dashboard/show"
  end
end<commit_msg>Cleaned up controller. Ridiculously slim now with one action ha<commit_after>class StreetSweepsController < ApplicationController
  respond_to :json, :html

  def show
    @schedules = StreetSweep.schedules(params[:id]).to_json
    respond_with @schedules
  end
end
{'fraction_non_alphanumeric': 0.08765432098765433, 'fraction_numerical': 0.0, 'mean_word_length': 3.53072625698324, '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': '2968334', 'n_tokens_mistral': 248, 'n_tokens_neox': 244, 'n_words': 58}