It's called because you set 'id=>...' as a html-option. You could provide a patch. ;-)
CommentAuthorpweil
Hmmm, ok. Seems like it ought to be an option instead of a default. What is the suggested way for overriding this? Place a 'new' link_to function (minus the line $this->convert_options_to_javascript($html_options) in application_controller? Or do I need to use a function with a different name?
CommentAuthorpweil
OK, the only thing I could do that seems to work is to modify UrlHelper::link_to. Is there no way to override built-in functions other than to modify the original? In any case, what I did was to I adda loop that checks for any javascript options. This may not be the best way to do this; if anyone knows of a better, more efficient method, I'm all ears:
function link_to($name = null, $options = array(), $html_options = array(), $parameters_for_method_reference = null) { if (!empty($html_options)) {
// foreach loop added by pw to make javascript an option, not a default
foreach (array('confirm', 'popup', 'post') as $option){ if (isset($html_options[$option])) { $this->convert_options_to_javascript($html_options); } } // end modification