working basic state

This commit is contained in:
2026-07-27 21:55:41 -06:00
parent 0b4532282d
commit 7ebf6dbf41
2 changed files with 8 additions and 12 deletions
+7 -11
View File
@@ -16,16 +16,12 @@ class DashboardController < ApplicationController
private
def filter_records
records = Joint.all
records = records.where(joint: params[:joint]) if params[:joint].present?
records
if params.include?(:joint)
records = Joint.all
records = records.where(joint: params[:joint])
records
else
[]
end
end
# old broken: def index
# old broken: @joint = Joint.distinct.pluck(:Joint)
# old broken:
# old broken: @records = Joint.all
# old broken:
# old broken: @records = @records.where(Joint: params[joint]) if params[:joint].present?
# old broken: end
end