Forum: Ruby on Rails link_to_remote(image_url url_for_file_column(product, "image

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
73606b1d1042de19056f3d59492b652f?d=identicon&s=25 Charlie Bowman (beachguy82)
on 2006-01-09 00:40
I apologise for bad formatting. I don't know how to make it nice in an
email

How do you nest image_url tags into link_to_remote tags.  The following
creates the error:wrong number of arguments (3 for 2)

 <%= link_to_remote(image_tag url_for_file_column(product, "image_url"),
                    { "class"       =>  "small_product",
                      "onMouseOver" =>  "this.className =
'product_hover'",
                      "onMouseOut"  =>  "this.className =
'small_product'"},
                      :complete => "eval(request.responseText)",
                      :url      =>  { :action => :update_form }) %>


If I remove the html options it works fine, but I need them.  Here is a
working sample without the html options.

<%= link_to_remote(image_tag url_for_file_column(product, "image_url"),
                    :complete => "eval(request.responseText)",
                    :url      =>  { :action => :update_form }) %>
This topic is locked and can not be replied to.