Forum: Ruby on Rails link_to(... :popup => true) problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Steve R. (Guest)
on 2006-03-11 00:07
I have a file_column that points to a pdf. I want that pdf to open in a
new window, thus wrote the code:

<%= link_to('PDF version', url_for_file_column('floor_plan',
'pdf_file'), :popup => true) %>

which generates the code:

<a href="/floor_plan/pdf_file/12/first_floor.pdf"
onclick=";return false;">PDF version</a>

The problem is that while this works in IE/Win it opens a blank popup on
Safari and Mozilla, and opens the PDF in Preview (well, Mozilla asks
first). So, the only case where this construct works is IE/Win. Wow!

Any thought on how to make the PDF appear in the popup, as originally
planned? I don't want to litter people's downloads directories with

This topic is locked and can not be replied to.