Edit in place for select

Hi there,

I am struggling to have an edit in place field for a select control.
This select control picks its options from a database table.

Googling got me some code examples. But none of them worked for me.
They all seem to assume things. I'd appreciate if some body can point
me at a complete code listing or ways to get this done.

Thanks much in advance.

Thanks Tim. It worked.

To make things little neat, I moved this whole code into a helper
method that returns me a javascript code.

Thanks Tim. It worked.

To make things little neat, I moved this whole code into a helper
method that returns me a javascript code.

If I might suggest a slight improvement:

### HELPER ###
  def map_statuses(collection)
    collection.map {|status| [status.id, status.status_name] }.to_json
  end

Then you don't have to worry about the potential problem of quotes within your status_name column. ('cause to_json will handle it for you)

-Rob

Rob Biedenharn http://agileconsultingllc.com
Rob@AgileConsultingLLC.com

Here it is (modified to my needs):