Hi fellow rubians
Im trying to populate one collection_select from another and I got it
pretty much down I think:
VIEW 1 (first combobox):
<%= collection_select( :doctype, :name, @doctypes, :id, :name, options =
{:prompt => âSelect doctypeâ}) %>
<%= observe_field âdoctype[name]â, :frequency => 2,
:update => âfieldtypesâ,
:url => {:action => âdoctype_changedâ,
} %>
Second combobox is about the same. Controller method:
def doctype_changed
@doctype_pages, @doctypes = paginate :doctypes
@fieldtypes = @doctypes[???].fieldtypes
render :partial => âfieldtypeâ, :layout => false
end
Now this works fine if i give it a number in the ??? part and info
pops up in the second combobox just fine. Now obviously what I want to
is to pass the value of combobox 1 to this method, but I cant figure out
what this parameter is called.
In the errormessage it states I send the correct value, I just need to
know how to reference it in my doctype_changed-method:
Request
Parameters: {â1â=>""}
(etc.)
Thanks for any help