In a custom advanced search form, what is the best way to perform a query to filter results?
class UsersController < ApplicationController
  def index
    @users = User.all
  end
end
In many case we have different types of data, for example:
name will be a string, surname will be a string, age will be an integer
In my specific case, i have a form with some filters that user can or can not fill. How can i do a dynamic query?
 
     
    