Anybody a have better method for having an onmouseover (or any event).
This is the method used but its not as pretty and has to be done for
every mouse event.
def link_to_remote_mover(name, options = {}, html_options = {})
link_to_function_mover(name, remote_function(options),
html_options)
end
def link_to_function_mover(name, *args, &block)
html_options = args.last.is_a?(Hash) ? args.pop : {}
function = args[0] || ''
html_options.symbolize_keys!
function = update_page(&block) if block_given?
content_tag(
"a", name,
html_options.merge({
:href => html_options[:href] || "javascript:void(0)",
:onmouseover => (html_options[:onmouseover] ?
"#{html_options[:onmouseover]}; " : “”) + “#{function}; return false;”
})
)
end