---
title: "in_place_editing in rails 2.1.0"
author: "PBFox"
date: "2008-09-01T20:44:00Z"
tags: []
slug: "in-place-editing-in-rails-2-1-0"
draft: false
lastmod: "2008-09-01T20:44:00Z"
id: 479228
url: "https://developerwork.iteye.com/blog/479228"
---

Called id for nil, which would mistakenly be 4 -- if you really wanted the id of nil, use object\_id

“If you’re receiving this error while using the in\_place\_editor\_field method, chances are you’re iterating through a list of objects and you’re passing the variables to the method incorrectly.

To fix this problem, set the current iteration as an instance variable and you should be fine.

For example:

&lt;% for person in @people %&gt;  
&lt;% @person = person %&gt;  
&lt;%= in\_place\_editor\_field :person, :name %&gt;