views:

87

answers:

2

EDIT: I have accidentally awarded a bounty of 500 points for this question - please do not answer it as I did this without realising what was going on - yes I'm an idiot

In rails 2.3.x, the following code would open a link in a popup window:

= link_to "resource", resource_path(resource), :popup => true

But in Rails 3 I get the error message: DEPRECATION WARNING: :popup has been deprecated. I'm guessing that this is to do with the drive to keep JS unobtrusive. Anyone know how to fix this? I'm using prototype...

PS - In case it makes a difference, I don't actually use :popup => true, instead I have:

:popup => ['new_window', 'status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,height=550,width=480']
+1  A: 

And so it should be, this is a move in the Rails 3 framework towards unobtrusive javascript, if you wish to continue using popups, write your own javascript.

Omar Qureshi
thanks. I had a feeling this would be the case
stephenmurdoch
+1  A: 

fixed this using prototype-legacy-helper plugin and link_to_function with a javascript method found here

stephenmurdoch