Baffling Ajax.Updater problem

Hi, I seem to be having a problem with Ajax.Updater passing variables
correctly. I have a Ajax call that does this:

<%= link_to item.name, {:action => “#”}, {“onmouseover” => “new
Ajax.Updater(‘display_stuff’, ‘display’, {parameters:‘client=IBM’})”} %>

My ‘display’ action only has one line:

def display
@client = params[:client]
end

Looking at the log, the variable seems to have been passed correctly:

Processing DisplayController#display (for 127.0.0.1 at 2007-07-29
22:58:06) [GET]
Session ID: a724b690db0cfe794dd1c3821cbf0919
Parameters: {“client”=>“IBM”, “action”=>“display”,
“controller”=>“display”}

Any idea, anyone?

Hi,

you havn’t said what it isn’t doing.

From the info you provide, @client should be taking on the value of
‘IBM’. But you are doing nothing with that in the controller. If
your view is displaying the client then you will need to look up the
client IBM from your database using a suitable find operation. Now
you may be doing this in the view template. If you are unsure what is
in @client, then try putting
<%= debug @client %> into your template.

HTH
Tonypm