RE: [Rails] Collection_select and Ajax.

(I posted this earlier but it doesn't appear on the group, so I'm
writing it again, If it appears twice, I apologize.)

I have a drop-down box that allows the user to select a language. I want
to use Ajax to render a filtered list of items based on the language
selected. I don't want the user to press a Submit button nor refresh the
page, of course.

I have it working, but my solution ugly so I believe I'm not doing it
the proper Rails way.

I'm using the standard collection_select in my view:

<%= collection_select ('item', 'language_id', @languages, 'id', 'lang',
{}, { :id => 'lang_select' } ) %>
<%= observe_field( 'lang_select',

Nathan Leach wrote:

with AJAX the value returned is kept in the "request.raw_post" variable, so you will probably have to check that to get the returned value.

That's what I was missing. I didn't know about request.raw_post and
couldn't figure out where Ajax was storing the value. Tx!