Using the command:
script/generate scaffold User name:string login:string password:string
It created a layout in html standard for CRUD in app/views/users.
I wonder if you can change this layout (html) standard
that is generated by scaffold, for example by placing the default
layout of
my system, so I do not need to change the layout of each CRUD
individually.
Is it possible? If possible please suggest me a tutorial or me
describe step-by-step how to proceed to effect that change.
Friend you have not understood the question ...
I want to change the layout before running the scaffold.
For example:
I want to change the default layout of the scaffold.
And when I run the scaffold is created the html (which I already
changed)
in app / views / users.
I see, so you want to design how the page will look before running the
scaffold? If so, no there is no way to do this. Scaffolding
autogenerates the html - so unless you modified some core rails class
the output is always the same. I wanted to do the same thing when I
started. Once you get used to erb you won't really need to scaffold.
Using the command:
script/generate scaffold User name:string login:string password:string
It created a layout in html standard for CRUD in app/views/users.
I wonder if you can change this layout (html) standard
that is generated by scaffold, for example by placing the default
layout of
my system, so I do not need to change the layout of each CRUD
individually.
Is it possible? If possible please suggest me a tutorial or me
describe step-by-step how to proceed to effect that change.
Thank you.
Best Regards ...
Adriano Dias da Silva
Greetings
I would recommend to take a look at this :
you can create your custom generator exactly the way you like so you can
use your own scaffold layout.