# Is it possible to save text from div fields to activerecord?

**URL:** <https://www.ruby-forum.com/t/is-it-possible-to-save-text-from-div-fields-to-activerecord/84681>\
**Category:** Rails\
**Created:** [February 6, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-save-text-from-div-fields-to-activerecord/84681 "2007-02-06T23:23:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sneptune](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sneptune](https://www.ruby-forum.com/u/sneptune)\
**Post date:** [February 6, 2007, 11:23pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-save-text-from-div-fields-to-activerecord/84681/1 "2007-02-06T23:23:31Z")

</div>

Hi,

Right now, my application would generate text to a DIV field in the view  
using Ajax. Is there anyway to store the data into a record? It would  
be possible with a text field, but it is very awkward if text field is  
used instead of DIV.

---

<div class="post-metadata">

**Author:** ![sneptune](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sneptune](https://www.ruby-forum.com/u/sneptune)\
**Post date:** [February 7, 2007, 9:27pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-save-text-from-div-fields-to-activerecord/84681/2 "2007-02-07T21:27:49Z")

</div>

A text field looks too ugly and I don’t know how I could send data to  
both text field and div simultaneously. In the end, I changed the logic  
of the program so that the text generated will be saved in the active  
record, the view would have to look into the record for the text.  
Thanks anyway for the suggestion though.

---

<div class="post-metadata">

**Author:** ![sneptune](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/da6949/32.png) [@sneptune](https://www.ruby-forum.com/u/sneptune)\
**Post date:** [February 6, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-save-text-from-div-fields-to-activerecord/84681/3 "2007-02-06T23:30:24Z")

</div>

How about a textarea?

If you really need to you could update a hidden form field with the div  
data  
and them submit it but I sure wouldn’t want to go down that road
