# Preview / edit form data in rails

**URL:** <https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568>\
**Category:** Rails\
**Created:** [September 2, 2007, 12:56am UTC](https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568 "2007-09-02T00:56:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![shybe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@shybe](https://www.ruby-forum.com/u/shybe)\
**Post date:** [September 2, 2007, 12:56am UTC](https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568/1 "2007-09-02T00:56:01Z")

</div>

Ok, I’m trying to have a form that when submitted redirects to a  
preview of the form data,  
with an option to edit, before finally commiting it to the database. I  
know this must involve sessions or cookies, Does anyone know how this  
can be done?

---

<div class="post-metadata">

**Author:** ![shybe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@shybe](https://www.ruby-forum.com/u/shybe)\
**Post date:** [July 1, 2009, 11:13pm UTC](https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568/2 "2009-07-01T23:13:58Z")

</div>

shybe wrote:

> Ok, I’m trying to have a form that when submitted redirects to a  
> preview of the form data,  
> with an option to edit, before finally commiting it to the database. I  
> know this must involve sessions or cookies, Does anyone know how this  
> can be done?

I have the exactly problem. if you discover, please posted here. I will  
do the same.

Thanks

---

<div class="post-metadata">

**Author:** ![shybe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b487fb/32.png) [@shybe](https://www.ruby-forum.com/u/shybe)\
**Post date:** [July 1, 2009, 11:45pm UTC](https://www.ruby-forum.com/t/preview-edit-form-data-in-rails/113568/3 "2009-07-01T23:45:59Z")

</div>

Penelope W. wrote:

> shybe wrote:
> 
> > Ok, I’m trying to have a form that when submitted redirects to a  
> > preview of the form data,  
> > with an option to edit,  
> > […]

It occurs to me that you could abuse ActiveRecord’s validations for this  
– use a boolean virtual attribute whose presence is validated. It  
won’t be set on the first submission, so the validator will redirect to  
the form, at which point you can set the boolean…

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid
