Not sure where to go at this point.
Trying the above with no success.
I had also tried blank and didn’t help.
Right now, using CriteriaQuery plugin my statements look like this (i removed the if statement as it was giving me a nil error):
pq = Position.query
pq.category_id_in(params[:category_id])
pq.state_id_in(params[:state_id])
pq.term_id_in(params[:term_id])
pq.city_in(params[:city].split(‘,’))
pq.title_in(params[:title].split(‘,’))
pp pq
@positions = pq.find
Which seems to work on their own (without and if clause)
Here I only chose one field (printout using PP):
#<Criteria::Query:0xab214e8
@join_aliases={“positions”=>“positions”},
@model_class=Position,
@restrictions=
[#<Criteria::In:0xab20cd8
@attribute_name=“category_id”,
@model_class=Position,
@parent=#<Criteria::Query:0xab214e8 ...>,
@query=#<Criteria::Query:0xab214e8 ...>,
@restrictions=[],
@value="3">,
#<Criteria::In:0xab20b88
@attribute_name="state_id",
@model_class=Position,
@parent=#<Criteria::Query:0xab214e8 ...>,
@query=#<Criteria::Query:0xab214e8 ...>,
@restrictions=[],
@value=nil>,
#<Criteria::In:0xab20a68
@attribute_name=“term_id”,
@model_class=Position,
@parent=#<Criteria::Query:0xab214e8 …>,
@query=#<Criteria::Query:0xab214e8 …>,
@restrictions=[],
@value=nil>,
#<Criteria::In:0xab208b8
@attribute_name=“city”,
@model_class=Position,
@parent=#<Criteria::Query:0xab214e8 …>,
@query=#<Criteria::Query:0xab214e8 …>,
@restrictions=[],
@value=[]>,
#<Criteria::In:0xab20720
@attribute_name=“title”,
@model_class=Position,
@parent=#<Criteria::Query:0xab214e8 …>,
@query=#<Criteria::Query:0xab214e8 …>,
@restrictions=[],
@value=[]>]>