# Form/field Generator

**URL:** <https://www.ruby-forum.com/t/form-field-generator/125941>\
**Category:** Rails\
**Created:** [January 14, 2008, 1:04am UTC](https://www.ruby-forum.com/t/form-field-generator/125941 "2008-01-14T01:04:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![antonaylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Post date:** [January 14, 2008, 1:04am UTC](https://www.ruby-forum.com/t/form-field-generator/125941/1 "2008-01-14T01:04:33Z")

</div>

Is there a generator akin to the scaffold generator that generates the  
views under some sort of control?

I’ve seen ‘scaffold\_form’ and its just about acceptable for the \*\*  
FORMS\*\* (edit/new), but I’m wondering if there is something more capable  
that also includes the ‘view’ and ‘list’, allows id and css tagging.  
I really want to avoid hand typing if I can make rails/ruby do the work  
🙂

Why? I’m experimenting with REST on a non-trivial DB schema and  
non-trivial functionality and I really don’t want to be bogged down in  
all the rest of the of these details and having them disrupt my train of  
thought.

–  
“Opportunity often comes disguised in the form of misfortune, or  
temporary defeat.” – Napoleon Hill

---

<div class="post-metadata">

**Author:** ![antonaylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Post date:** [January 14, 2008, 4:47am UTC](https://www.ruby-forum.com/t/form-field-generator/125941/2 "2008-01-14T04:47:18Z")

</div>

You mean something that can lay it out in a table:

\<tr class='object' id ='object[1];\>\<td\>Noname\</td\>\</tr\> \</table\> \<p\>HAML helps:\</p\> \<p\>%table\<br\> %tr\<br\> %td Name\<br\> %tr[object]\<br\> %td= object.name\</p\> \<p\>\<a href="http://haml.hamptoncatlin.com" class="onebox" target="\_blank"\>http://haml.hamptoncatlin.com\</a\>\</p\> \<p\>On Jan 14, 2008 10:24 AM, Anton J Aylward \<a href="mailto:removed\_email\_address@domain.invalid"\>removed\_email\_address@domain.invalid\</a\> wrote:\</p\> \<blockquote\> \<p\>Why? I’m experimenting with REST on a non-trivial DB schema and\<br\> non-trivial functionality and I really don’t want to be bogged down in\<br\> all the rest of the of these details and having them disrupt my train of\<br\> thought.\</p\> \<p\>–\<br\> “Opportunity often comes disguised in the form of misfortune, or\<br\> temporary defeat.” – Napoleon Hill\</p\> \<blockquote\>\</blockquote\> \</blockquote\> \<p\>–\<br\> Ryan B.\<br\> \<a href="http://www.frozenplague.net" class="onebox" target="\_blank"\>http://www.frozenplague.net\</a\>\<br\> Feel free to add me to MSN and/or GTalk as this email.\</p\>

| Name |

---

<div class="post-metadata">

**Author:** ![antonaylward](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/eb8c5e/32.png) [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Post date:** [January 14, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/form-field-generator/125941/3 "2008-01-14T15:39:05Z")

</div>

No.  
I mean “generate my views & forms”.  
SHAZAM!

I may end up editing them at some time in the distant future  
but I particularly DO NOT want to be typing in their contnets.

I’ve just tried ‘scaffold\_form’  
It builds the forms but not the ‘list members’ and ‘show item’ views

As I said, I’m trying something non trivial - lots of field and  
relationships.

Ryan B. said the following on 13/01/08 10:39 PM:

> %tr  
> Is there a generator akin to the scaffold generator that generates the  
> non-trivial functionality and I really don’t want to be bogged down in  
> all the rest of the of these details and having them disrupt my train of

–  
When I used to teach creative writing, I would tell the students to make  
their characters want something right away even if it’s only a glass of  
water. Characters paralyzed by the meaninglessness of modern life still  
have to drink water from time to time.  
–Kurt Vonnegut
