It is very ease make link_to_remote accessible, it is, forcing it has a href value different than #, which is the default value if you only indicate the :url parameter.
But, it is quite possible that both parameters have the same value. If so, you can redefine link_to_remote in this way:
module ActionView
module Helpers
module PrototypeHelper
def link_to_remote(name, options = {}, html_options = {})
html_options[:href] = options[:url] unless html_options[:href]
link_to_function(name, remote_function(options), html_options)
end
end
end
end

Escribe un comentario