in place editor and rjs

Hi all,

I've had a read thru similar topics on the list but am still

I want an in place editor to call an action that does some rjs, not
just return a text string.

Normally the action would do something like:

  def edit
    # model.update(params[:value]
    render :text => params[:value]

But I want to do more stuff:

  def edit
    # model.update(params[:value]
    render :action => 'edit.rjs'

What options do I need to use in the view to evaluate the javascript
returned? At the moment the javascript is just being displayed in the
field as a string.

I have hacked together the following, but is there a cleaner 'more
rails' way to do this?

<%= in_place_editor, :url => {:action => 'edit', :id =>},
  :complete => "function(transport, element){
    // Id rather use rjs to do my javascript than have it in the view
like this.
  }" %>

Any advice greatly appreciated,


I'd been using an old version of the helper. I downloaded the current
version of in_place_editor_field plugin and passed the option:

<%= in_place_editor_field .., .., :script => true %>

Works fine now. Cheers.