app/controllers/hearings/hearing_day_controller.rb
def default_range_start_date
    default = Time.zone.today.beginning_of_day
    # if vso users visit hearings/schedule page, show hearing days starting from today by default
    default -= 30.days if params[:action] == "index" && !current_user&.vso_employee?
    default
  end
## action is either index or index_with_hearings
action is either index or index_with_hearings
action is either index or index_with_hearings
def default_range_start_date
    default = Time.zone.today.beginning_of_day
    default -= 30.days if params[:action] == "index" && !current_user&.vso_employee?
    default
  end
def default_range_start_date default = Time . zone . today . beginning_of_day default -= 30 . days if params [ :action ] == "index" && ! current_user &. vso_employee? default end
action is either index or index_with_hearings
action is either index or index_with_hearings
# if vso users visit hearings/schedule page, show hearing days starting from today by default