Fix deprecation of link_to_function in Rails 4.1