Forum: Ruby on Rails bizarre problem

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Yannick M. (Guest)
on 2006-06-09 17:52
(Received via mailing list)

 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])
        :update => target,
        :loading => "loading('" + loading + "')",
        :loaded => "loaded('" + loading + "')",
        :before => "visible('" + visible + "')",
        :url => test

 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"?


Yannick M.
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
This topic is locked and can not be replied to.