I have the following code in a rails controller:
@users = User.where(["first_name = :first_name or
last_name = :last_name or
company = :company",
{ first_name: term, last_name: term,
company: term }])
Term is term = params[:search]
I don't like that I'm repeating term
{ first_name: term, last_name: term,
company: term }
is there a DRYER way to accomplish this?
Thank you!