When I print my report
<td><%= link_to (index + 1).to_s, data_report_path(datum.id), target: "_blank" %></td>
in print view,I want the index displayed ,say "1".but when I do print,it shows "1(/report_data/1/report)"
I'm using ruby on rails.
what I have tried:
1.I have added following code in my app/assets/stylesheets/application.css.scss
@media print {
.noprint {display:none !important;}
a:link:after, a:visited:after {
display: none;
content: "";
}
}
2.add class:'no-print' so the code becomes
link_to (index + 1).to_s, data_report_path(datum.id), class:'no-print',target: "_blank"
but neither works.
Where should I add & what code should I add to hide this link when print?
instead of just print out index,it also prints the link.how can I get just the index printed?
no-print
but in the css rule it'snoprint
.