I'm creating an application which lists reports which users should be able to search by the fields 'reference_id', 'test_id' and 'category'.
There is to be 3 boxes on the Reports homepage which display an input for the reference ID and Test ID with a submit button along with a dropdown list for the category with a submit button.
In my controller simply called 'ReportsController' I have the following actions
def all @reports = Report.where(visible: true) end def reference @reports = Report.where(reference_id: params[:ref_id], visible: true) end def test @reports = Report.where(test_id: params[:test_id], visible: true) end def product @reports =  end
Is this the correct way or would you advise another way?