# Customize scaffold

**URL:** <https://www.ruby-forum.com/t/customize-scaffold/81605>\
**Category:** Rails\
**Created:** [January 10, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605 "2007-01-10T14:49:20Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 10, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/1 "2007-01-10T14:49:20Z")

</div>

hi all  
is there a simple solution to change the CRUD layout using only the  
scaffold method (without generate scaffold)?

tnx

---

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 10, 2007, 4:39pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/2 "2007-01-10T16:39:20Z")

</div>

Yea but it involves you changing the templates. If you freeze your gems  
(rake freeze:gems) and then go into the vendor/rails folder, look under

actionpack/action\_controller/templates/scaffolds

Change them there.

(Just did this the other day!)

---

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 11, 2007, 12:36pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/3 "2007-01-11T12:36:21Z")

</div>

Brian H. wrote:

> Yea but it involves you changing the templates. If you freeze your gems  
> (rake freeze:gems) and then go into the vendor/rails folder, look under
> 
> actionpack/action\_controller/templates/scaffolds
> 
> Change them there.
> 
> (Just did this the other day!)

tnx i’ll try 😉

---

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 18, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/4 "2007-01-18T22:21:09Z")

</div>

Brian H. wrote:

> Yea but it involves you changing the templates. If you freeze your gems  
> (rake freeze:gems) and then go into the vendor/rails folder, look under
> 
> actionpack/action\_controller/templates/scaffolds
> 
> Change them there.
> 
> (Just did this the other day!)

ops! when i try to freeze the gems this is the output:

rake aborted!  
Don’t know how to build task ‘gems:freeze’

i didn’t found help in google ☹

---

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 18, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/5 "2007-01-18T22:42:25Z")

</div>

Giuseppe M. wrote:

> ops! when i try to freeze the gems this is the output:
> 
> rake aborted!  
> Don’t know how to build task ‘gems:freeze’
> 
> i didn’t found help in google ☹

“rake rails:gems:freeze” work good but if i change the templates i can’t  
show my modifies in rails…

---

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 19, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/6 "2007-01-19T15:41:45Z")

</div>

Giuseppe M. wrote:

> Giuseppe M. wrote:
> 
> > ops! when i try to freeze the gems this is the output:
> > 
> > rake aborted!  
> > Don’t know how to build task ‘gems:freeze’
> > 
> > i didn’t found help in google ☹
> 
> “rake rails:gems:freeze” work good but if i change the templates i can’t  
> show my modifies in rails…

Giuseppe M. wrote:

> Giuseppe M. wrote:

> “rake rails:gems:freeze” work good but if i change the templates i can’t  
> show my modifies in rails…

Changes to templates will not automatically"back-port" to previously  
generated code of course. Are you actually saying that your template  
changes are not being used when you generate new models and controllers  
in the modified project?

---

<div class="post-metadata">

**Author:** ![j0sh](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/bbce88/32.png) [@j0sh](https://www.ruby-forum.com/u/j0sh)\
**Post date:** [January 19, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/customize-scaffold/81605/7 "2007-01-19T15:47:41Z")

</div>

> > Giuseppe M. wrote:  
> > “rake rails:gems:freeze” work good but if i change the templates i can’t  
> > show my modifies in rails…
> 
> Changes to templates will not automatically"back-port" to previously  
> generated code of course. Are you actually saying that your template  
> changes are not being used when you generate new models and controllers  
> in the modified project?

yes… but i created a new application and now templates are correct 😉  
tnx
