Forum: Ruby on Rails In_place_editor_field throws error ...

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
B0be4bfef5a22697a0f44f4fe295aaef?d=identicon&s=25 James Whittaker (aftershock)
on 2006-03-28 16:00
I receive the following error:
Called id for nil, which would mistakenly be 4 -- if you really wanted
the id of nil, use object_id

when trying to use the in_place_editor_field tag:

<% for employee in @employees %>
<%= in_place_editor_field :employee, employee.fname %>
<% end %>

My model is called Employee and is being populated from a controller
method employees_list:

@employees = Employee.find_all

When I take the <%= in_place_editor_field :employee, employee.fname %>
out everything is back to normal.

ANy ideas, I have performed a search but no luck.
A9cdc0b24a1ee497ad749afab0ec5c30?d=identicon&s=25 Luigi Rizzo (luigi)
on 2006-04-05 22:08
(Received via mailing list)
Did you have any luck in finding the solution to your problem?

In fact I'm stuck at your same point and the email sent to the list
later on didn't help too much. In particular I don't get an error when
using the following form:

<% for task in @tasks %>
<%= state_class(task.state_id) %> align='left'><%= @task = task;
in_place_editor_field :task , :body %>
<% end %>

But the resulting field in still *not* editable ...
A9cdc0b24a1ee497ad749afab0ec5c30?d=identicon&s=25 Luigi Rizzo (luigi)
on 2006-04-05 22:11
(Received via mailing list)
Ugh! In a few minutes I found the solution in another (older) mail in
the list:

"Make sure you have
<%= javascript_include_tag :defaults %>

in your page/layout's head."

It turns out I had not included the above :-(

Sorry to the list members for having posted maybe too quickly. In any
case, I'm posting this for someone who may encounter this issue in the
This topic is locked and can not be replied to.