Open view template in another browser

Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’

How could I do this?
Thanks

Rafael R. wrote:

Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’

How could I do this?

You’d have to put the target attribute on the link tag that brings up
that page. By the time you get to the controller, it’s too late (well,
you could use JS, but why?).

Thanks

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Rafael R. wrote:

Hi all,
from inside my controller I need to do something like the following:
render :file =>‘my_view’,:target=>‘blank’

How could I do this?
Thanks

Also…this is usually not a good idea from a UI perspective. Most
browsers easily allow the user to open a plain link in a new window.
However, they tend not to make it easy for the user to force opening a
target=“_blank” link without a new window.

This means that target=“_blank” forces the user to accept a
proliferation of windows, whereas plain links give him more options.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]