In_place_edit_field

I have this tables in my database: “user” with such fields as “first”,
“last”, for the first and last name. Now, I want to make it so after
these values are submitted to the database the user can still edit their
personal info in place with the in_place_editor_field helper. The code
is as follows:

<%= in_place_editor_field ‘user’,‘first’,{}, :cols=>30%>

I cannot, however, get this helper to hit the database and resubmitt the
user data. It doesn’t make sense that these helpers would be in a form,
so how do you get this helper to write back to a database?

Shandy N. schrieb:

so how do you get this helper to write back to a database?

not entirely understanding your issue, but it sounds like your
controller method is the problem.

perhaps read this blog post
http://rubythis.blogspot.com/2006/11/using-rails-inplaceeditor-and.html

/ak

Shandy N. wrote:

I have this tables in my database: “user” with such fields as “first”,
“last”, for the first and last name. Now, I want to make it so after
these values are submitted to the database the user can still edit their
personal info in place with the in_place_editor_field helper. The code
is as follows:

<%= in_place_editor_field ‘user’,‘first’,{}, :cols=>30%>

I cannot, however, get this helper to hit the database and resubmitt the
user data. It doesn’t make sense that these helpers would be in a form,
so how do you get this helper to write back to a database?

I got it, in your controller you have to say:

in_place_edit_for :user, :first