# Baffling Ajax.Updater problem

**URL:** <https://www.ruby-forum.com/t/baffling-ajax-updater-problem/110801>\
**Category:** Rails\
**Created:** [July 31, 2007, 3:04am UTC](https://www.ruby-forum.com/t/baffling-ajax-updater-problem/110801 "2007-07-31T03:04:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![orlick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/53a042/32.png) [@orlick](https://www.ruby-forum.com/u/orlick)\
**Post date:** [July 31, 2007, 3:04am UTC](https://www.ruby-forum.com/t/baffling-ajax-updater-problem/110801/1 "2007-07-31T03:04:48Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![orlick](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/53a042/32.png) [@orlick](https://www.ruby-forum.com/u/orlick)\
**Post date:** [August 4, 2007, 11:09am UTC](https://www.ruby-forum.com/t/baffling-ajax-updater-problem/110801/2 "2007-08-04T11:09:00Z")

</div>

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
