In my project, I want to re-open a new tab using ruby code. When user clicks at attachment link, then that pdf should be open in new tab of same window. I tried a lot but I am not getting the way to solve it. Please guide me.
In my project, I want to re-open a new tab using ruby code .
Share
I am not sure if this is possible using Ruby since it deals with the UI part. It is indeed very much possible using HTML and Jquery.
You could simply set the
targetattribute as blank in the hyperlink redirecting to the PDF and it will open the file in a new tab. Something similar to this :If you want to use JQuery for this, you can try something like this :