Filter Results via Post

Hi guys,

I'm trying to filter my record results by submitting a post value via
select field with filter results. It works when the results are
active, but otherwise it returns a nil object error.

Here is my code:



You call params[:vendor][:id] without checking the value of
params[:vendor]. What if params[:vendor] is nil, as is the case when
it isn't passed? :slight_smile:

You'll probably find it more natural to work with the passed parameters
if you call the form input vendor_id instead of vendor[id].