Re: Ajax In place editor with drop downs (need help please)

Forget what I said before. :slight_smile:

I’m trying to use the Ajax In-Place Editor with drop downs.
In Scriptaculous 1.5.3 an Ajax In Place Collection Editor was added.

This is about it as far as integration with Rails :

Here is something I don’t understand -

“For example, in a list.rhtml file, the following defines an editor
for a
field called custom_field that has a number of options taken from the
FieldType* model:”

<%= in_place_collection_editor_field ‘custom_field’, ‘field_type’,
FieldType.find_all.collect{|x| [,]}

Okay, I get this but why isn’t the model for the custom_field included
Normally in a collection_select it would be :(model :method …)

So that is kind of weird. And what is really throwing me is the

def set_custom_field_field_type
@i = CustomField.find(params[:id]) # if this is the field that the
will be written to why am i doing a find?
f = FieldType.find(params[:value])