# In\_place\_editor\_field

**URL:** <https://www.ruby-forum.com/t/in-place-editor-field/108925>\
**Category:** Rails\
**Created:** [July 9, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/in-place-editor-field/108925 "2007-07-09T16:24:20Z")\
**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 9, 2007, 4:24pm UTC](https://www.ruby-forum.com/t/in-place-editor-field/108925/1 "2007-07-09T16:24:20Z")

</div>

Im using the in\_place\_editor\_field helper to make certain fields easily  
editable and able to update the database on the spot. The problem is  
that all this stuff gets submitted to the database on one page in a  
form. On the next page, the idea is that there is another form for  
submitting more user data but now the previously submitted data is  
reshown to make it editable in case there was an error in entering some  
bit of info. I am using the in\_place\_editor\_field because to me it  
doesn’t make sence to use another form. The problem is that there can be  
some fields that are left blank and that the user might want to add info  
to later in the process, but because they are left blank they are not  
editable even using the in\_place\_editor\_field helper. Is there anyway  
that anyone can think of to have the fields editable even though there  
might not be nothing more then a empty string in the database. I have  
tried checking to see if the user data is nil but that doesn’t seem to  
do much:

\<% if @user.addr.nil? %\>

Thanks, Shandy

---

<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 9, 2007, 6:47pm UTC](https://www.ruby-forum.com/t/in-place-editor-field/108925/2 "2007-07-09T18:47:26Z")

</div>

Just fill the empty strings before rendering the action…

MODEL.content\_columns.each do |column|  
write\_attribute(column.name, ‘Edit’) if  
read\_attribute(column.name).blank?  
end

HTH,

- H

On 7/9/07, Shandy N. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> ## to later in the process, but because they are left blank they are not
> 
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
Husein C.  
Yucca Intelligence Development

> **[قفل دیجیتال | قفل هوشمند | قفل الکترونیکی کره‌ای | یوکا](https://yuccahq.com/)**
>
> نگران قیمت بی‌ثبات هستی؟ از تخصصی‌ترین برند قفل هوشمند با اطمینان و تضمین قیمت خرید کن! معتبرترین برند کره جنوبی:قفل الکترونیکی یوکا همین الان تماس بگیرید و از تخفیف‌های شگفت‌انگیز ما استفاده کنید.

---

<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 9, 2007, 11:47pm UTC](https://www.ruby-forum.com/t/in-place-editor-field/108925/3 "2007-07-09T23:47:21Z")

</div>

That did it. Thanks for your help.

~S
