One of the cool things about rails is the Scriptalicious javascript library which you get as part of rails. I've just been trying to add in place editing to some of the fields in my app and I encountered a problem with way it's implemented in conjunction with the way I was decribing the view.
Anyway a much better description of the exact problem I was having and a solution (which is in the comments to the post) is at the Rabiit Creative Blog
Posted by rorym at August 27, 2006 11:17 AMSince your blog is referencing a post which is no longer there I'll post what I remember of the problem and the solution...
Problem is you want to display multiple in-place editor fields. However, saying something like...
@people.each do |person|
in_place_editor_for(person)
end
Doesn't work. The JavaScript method expects an instance variable. So pass it one.
@people.each do |person|
@person = person
in_place_editor_for(@person)
end
Hope that helps.
Posted by: Rabbit at March 29, 2008 8:57 PM