1

In my application I have the ability to upload an Excel spreadsheet so on top of adding a downloadable template, I also have a link to a shared Google Sheet where the user can use this as an option. The issue is that when I have the sharable link on the page, once clicked it opens a new tab (as requested), but also changes the url of the original application url to the Google Sheet url as well. Basically two tabs are now the same Google Sheet.

My Code:

%p= link_to('Google Sheet', 'https://docs.google.com/spreadsheets/example_url', target: '_blank')

Is there something that I am missing? I have the target: '_blank' which works correctly. Once clicked this opens the new tab, and if I was on my local server (localhost:3000), this then changes to the Google Sheets url as well.

jdgray
  • 1,863
  • 1
  • 11
  • 19

0 Answers0