ITeye博客

in_place_editing in rails 2.1.0

PBFox · 2008-09-01 20:44 · Markdown

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:

<% for person in @people %>
<% @person = person %>
<%= in_place_editor_field :person, :name %>

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。