Adding a filter of params for queries + active_record to build the query