testing for nil or empty and then...

Not sure how to code this
I’m testing if a param is empty or nil , using - if params[:category_id].empty?
I’m just at a loss as to how, if it is nil , omit it from the conditions in the query ?

Stuart

Did the original on this post come through to the list?

Stuart