You can bind callbacks to remote links in Rails 3, the rest of the attributes can be assigned as options.
link_to column.label,
sort_params,
remote: true,
title: column_header.info,
id: 'my_remote_link',
data: {
href: href,
controller_id: controller_id,
column_header_id: column_header_id,
active_scaffold_id: active_scaffold_id
}
We'll use the data-attributes for the callbacks.
$('#my_remote_link').bind('ajax:beforeSend, function() {
addActiveScaffoldPageToHistory($('#my_remote_link').data('href'), $('#my_remote_link').data('controller_id'));
});
See http://docs.jquery.com/Ajax_Events for a description of the different ajaxEvents.