Bizarre problem


#1

Hello,

I have following code in a helper:

def custom_ajax(link, options)
target = “target_” + options[:target_id]
loading = “loading_” + options[:target_id]
visible = “visible_” + options[:target_id]
#options[:url] = {:inline => 1 }.merge(options[:url])
test = {:inline => 1 }.merge(options[:url])
link_to_remote(
link,
{
:update => target,
:loading => “loading(’” + loading + “’)”,
:loaded => “loaded(’” + loading + “’)”,
:before => “visible(’” + visible + “’)”,
:url => test
}.merge(options)
)
end

The problem is that “:inline” is not set if I do it this way. I found
some workaround, but I use this syntax in more places. What am I doing
wrong? Is there a better way than “merge”?

Regards,

Yannick M. http://www.inma.ucl.ac.be/~majoros
Informaticien UCL/INMA-MEMA
4, avenue G. Lemaître
B-1348 Louvain-la-Neuve
Tel: +32-10-47.80.10
Fax: +32-10-47.21.80