link_to_function is a Rails 3 helper that allows to create a link whose onclick handler triggers the passed JavaScript. Deprecated in Rails 4.
The function works in one major Rails release and removed from another. That's why use of this is puzzling a lot of people.