I am trying to write an activerecord query in my index action that only shows Trips that have a category type of "Beaches". Here is my code:
Trip.includes(:categories).where("categories.type" == "#{params[:activity]}").all
params[:activity] returns "Beaches".
That query is not doing what I Think is doing and seems to give me back all Trips. What am I doing wrong?