Ask A Question

Notifications

You’re not receiving notifications from this thread.

Send a parameter thru a link without including it in the URL

Alex Deering asked in General

This is probably a super easy solution, but for some reasonits eluding me. Im using elasticsearch and searchjoy and passing the searchid so I can track conversions to refine search results. However, I would like to not include the search id in the url in the browser and just have it in the background. Here is my link code:

<%= link_to "View", @recipes.search.present? ? recipe_path(recipe, search_id: @recipes.search.id) : recipe, class: "btn btn-secondary btn-small justify-center w-1/2 self-center mt-2", data: {action: "click->modal#linkClose"} %>

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 84,387+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.