Problem with in_place_editor_field

ok, I am really pulling my hair out here over something that should be simple.

(Rails2, In_place_editor plugin)

In my index.html.erb, I have:
<ul>
  <% @tasks.each do |root| %>
     <li><%= render(:partial => "task_node", :object => root) %></li>
  <% end %>
</ul>

In my _task_node.html.erb, I have:
<%= in_place_editor_field task_node, 'description' %>
<ul><% task_node.children.each do |child| %>
    <li><%= render(:partial => "task_node", :object => root) %></li>
<% end %></ul>

I get an error which is
"Called id for nil, which would mistakenly be 4........"

(error comes from line 73 of in_place_macros_helper)

I am using this in the "normal" way successfully elsewhere in my project.

Thanks in advance before I go bald,

Alan

I get an error which is
"Called id for nil, which would mistakenly be 4........"

<ul><% task_node.children.each do |child| %>

    <li><%= render(:partial => "task_node", :object => root) %></li>
<% end %></ul>

Shouldn't that be :object => child ?

Mikel
http://lindsaar.net/

Mikel,
  It is in the code. I got lazy with cut and paste trying to give a
simpler example. Good catch, though!

--Alan

in_place_editor_field is one of the old school helper so it's expecting the first parameter to be the name of an instance variable.
A quick and dirty fix would be to put <% @task_node = task_node %> on the line above and change it to
<%= in_place_editor_field 'task_node', 'description' %>

Fred

Well, this gets me part of the way there. (although I have to admit,
I don't understand why.)

However, the HTML generated is:
<span class="in_place_editor_field"
id="#&lt;Task:0x2b2d504701f0&gt;_description_4_in_place_editor"></span><script
type="text/javascript">
//<![CDATA[
new Ajax.InPlaceEditor('#<Task:0x2b2d504701f0>_description_4_in_place_editor',
'/tasks/set_%23%3CTask:0x2b2d504701f0%3E_description/4',
{callback:function(form) { return Form.serialize(form) +
'&authenticity_token=' +
encodeURIComponent('de08c07c32d0105cd81841fc23d2b1ef4d4ea89f') }})
//]]>
</script>

Why doesn't it put the current value of the description in between the
span tags? (since there is no place to click, it isn't very
helpful....)

Thanks in advance,

Alan

Well, this gets me part of the way there. (although I have to admit,
I don't understand why.)

it looks like you;ve still got <%= in_place_editor_field task_node,
'description' %> in your form instead of <%= in_place_editor_field
'task_node', 'description' %>

Thanks, that did it!

--Alan