app/controllers/hearings/hearing_day_controller.rb
def index
    respond_to do |format|
      format.html do
        render "hearings/index"
      end

      format.json do
        if hearing_day_range.valid?
          serialized_hearing_days =
            ::HearingDaySerializer.serialize_collection(hearing_days_in_range_for_user, current_user)

          render json: {
            hearings: serialized_hearing_days,
            startDate: hearing_day_range.start_date,
            endDate: hearing_day_range.end_date
          }
        else
          hearing_day_range_invalid
        end
      end
    end
  end
# show schedule days for date range provided
show schedule days for date range provided
show schedule days for date range provided
def index
    respond_to do |format|
      format.html do
        render "hearings/index"
      end
      format.json do
        if hearing_day_range.valid?
          serialized_hearing_days =
            ::HearingDaySerializer.serialize_collection(hearing_days_in_range_for_user, current_user)
          render json: {
            hearings: serialized_hearing_days,
            startDate: hearing_day_range.start_date,
            endDate: hearing_day_range.end_date
          }
        else
          hearing_day_range_invalid
        end
      end
    end
  end
def index respond_to do | format | format . html do render "hearings/index" end format . json do if hearing_day_range . valid? serialized_hearing_days = :: HearingDaySerializer . serialize_collection ( hearing_days_in_range_for_user , current_user ) render json : { hearings : serialized_hearing_days , startDate : hearing_day_range . start_date , endDate : hearing_day_range . end_date } else hearing_day_range_invalid end end end end
show schedule days for date range provided
show schedule days for date range provided