# In\_place\_edit\_field

**URL:** <https://www.ruby-forum.com/t/in-place-edit-field/108773>\
**Category:** Rails\
**Created:** [July 6, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/in-place-edit-field/108773 "2007-07-06T21:42:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [July 6, 2007, 9:42pm UTC](https://www.ruby-forum.com/t/in-place-edit-field/108773/1 "2007-07-06T21:42:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [July 6, 2007, 11:19pm UTC](https://www.ruby-forum.com/t/in-place-edit-field/108773/2 "2007-07-06T23:19:42Z")

</div>

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](http://rubythis.blogspot.com/2006/11/using-rails-inplaceeditor-and.html)”

/ak

---

<div class="post-metadata">

**Author:** ![snantz](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/c2a13f/32.png) [@snantz](https://www.ruby-forum.com/u/snantz)\
**Post date:** [July 6, 2007, 11:19pm UTC](https://www.ruby-forum.com/t/in-place-edit-field/108773/3 "2007-07-06T23:19:53Z")

</div>

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
