# Better Generators

**URL:** <https://www.ruby-forum.com/t/better-generators/108341>\
**Category:** Rails\
**Created:** [July 2, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/better-generators/108341 "2007-07-02T15:49:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [July 2, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/better-generators/108341/1 "2007-07-02T15:49:53Z")

</div>

I was wondering which generators (in particular view generators) you  
guys would recommend to replace the built-in code from the scaffolding  
system? I’m particularly interested in replacing the current views, as I  
would like for:

1. Foreign keys should get a dropdown list linked to the other table  
instead of a textbox.
2. I’d like the columns to actually be listed on the page, instead of  
iterating through them at run-time, as this makes it easier to customize  
them.

Any thoughts?

* * *

Yahoo! oneSearch: Finally, mobile search that gives answers, not web  
links.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [July 2, 2007, 5:04pm UTC](https://www.ruby-forum.com/t/better-generators/108341/2 "2007-07-02T17:04:03Z")

</div>

Well as the point of the scaffold generator is to get you a starting  
place  
when learning Rails, or doing something simple, I think it serves it’s  
job  
quite well. Scaffolding is never and was never meant to be a production  
site  
generation recipe.

That said, I believe the AjaxScaffold has a bit more of the  
functionality  
you’re looking for, otherwise you are free to jump into the scaffold and  
make those changes yourself. However, I highly doubt such stuff will be  
added to the Rails core as it is superfluous.

Jason

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [July 2, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/better-generators/108341/3 "2007-07-02T20:23:51Z")

</div>

I was just thinking that if I could push the scaffolding a bit further,  
it would get rid of about half the stuff I do in every project (making  
dropdowns for foreign keys, inferring relationships between models,  
using better markup).

Has anyone tried Custom\_Scaffold? I was thinking I could customize it to  
do most of what I need:  
[http://www.tonyspencer.com/2007/03/01/custom-scaffolding-for-rails/](http://www.tonyspencer.com/2007/03/01/custom-scaffolding-for-rails/)

Will

Jason R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: Well as the point of the  
scaffold generator is to get you a starting place when learning Rails,  
or doing something simple, I think it serves it’s job quite well.  
Scaffolding is never and was never meant to be a production site  
generation recipe.

That said, I believe the AjaxScaffold has a bit more of the  
functionality you’re looking for, otherwise you are free to jump into  
the scaffold and make those changes yourself. However, I highly doubt  
such stuff will be added to the Rails core as it is superfluous.

Jason

On 7/2/07, Will G. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote: I was wondering  
which generators (in particular view generators) you guys would  
recommend to replace the built-in code from the scaffolding system? I’m  
particularly interested in replacing the current views, as I would like  
for:

1. Foreign keys should get a dropdown list linked to the other table  
instead of a textbox.
2. I’d like the columns to actually be listed on the page, instead of  
iterating through them at run-time, as this makes it easier to customize  
them.

Any thoughts?

* * *

Yahoo! oneSearch: Finally, mobile search that gives answers, not web  
links.

* * *

It’s here! Your new message!  
Get new email alerts with the free Yahoo! Toolbar.

---

<div class="post-metadata">

**Author:** ![hotgazpacho](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/a587f6/32.png) [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Post date:** [July 2, 2007, 9:44pm UTC](https://www.ruby-forum.com/t/better-generators/108341/4 "2007-07-02T21:44:06Z")

</div>

Have you tried out ActiveScaffold?

> **[噂のUR賃貸事情 |](http://www.activescaffold.com/)**
>
> UR賃貸住宅は、子連れ家族に人気があります。 1つは、間取りに対する専有面積が広いところです。将来的に家族が増えても安心ですよ。次に、安全性の高い子供達の共有空間がある点です。最後は、緑溢れる豊かな自然環境があるところです。子供達がのびのびと成長していける空間が、UR賃貸住宅には沢山あります。

I’ve just started using it, and it looks very promising.
