Silly read only databases...
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
class JointsController < ApplicationController
|
||||
def index
|
||||
# Grab values:
|
||||
@available_categories = JointsDashboard.distinct.pluck(:Joint)
|
||||
|
||||
# Start with base query:
|
||||
@records = JointsDashboard.all
|
||||
|
||||
# Filter data based on dropdown selection params
|
||||
@records = @records.where(Joint: params[:joint]) if params[:joint].present?
|
||||
#@records = @records.where(Joint == params[:joint]) if params[:joint].present?
|
||||
puts @records
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user