Ask A Question


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", ? recipe_path(recipe, search_id: : recipe, class: "btn btn-secondary btn-small justify-center w-1/2 self-center mt-2", data: {action: "click->modal#linkClose"} %>

Join the discussion
Create an account Log in

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

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

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

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

    © 2024 GoRails, LLC. All rights reserved.