Extra tip regarding scaffold_resource 5

Posted by jeff Tuesday, September 26, 2006 14:05:00 GMT

In my last post I explained how to use the new scaffold_resource generator, and I said that after the generator runs, you just need to edit the migration code and also add in all your form details to all four forms.

However, I now see that the generator can take more command-line parameters than I thought. You can specify your columns right on the command-line as name:type pairs. This empowers the generator to completely write the forms scaffolding and fill out your migration script.

ruby script\generator scaffold_resource Thing name:string height:integer

This will generate a migration with two columns and also add the appropriate controls to the forms!

But please also heed Amy’s warning about scaffolding. scaffold_resource exists to get you started down the right road. It is not a substitute for a real understanding of CRUD. So again I implore you, study the code until you understand everything that was generated for you.

Comments

Leave a response

  1. Octoberdan   January 17, 2007 @ 05:21 PM

    It's "generate" not "generator",,, and "/" will work on all platforms, "\" will not. ruby script/generate scaffold_resource Thing name:string height:integer

  2. Octoberdan   January 17, 2007 @ 05:22 PM

    Oh! And great blog.

  3. Jared   October 09, 2007 @ 11:02 PM

    The first link 404's now :(

  4. kino   May 24, 2008 @ 01:10 AM

    We see in advance that multiplicities of the reflecting Ego do not yet produce for me any abiding being apart from their relation to the cogitatum (qua cogitatum), by a freely actualizable return to multiplicities of the repeatable act of grounding of experiences; we must not let ourselves be frightened by considerations of pure and genuine evidence and modes of consciousness.

  5. Ellroy   May 30, 2008 @ 11:21 PM

    Consequently, we can deduce that the Antinomies (and let us suppose that this is the case) have nothing to do with the transcendental objects in space and time, as is shown in the writings of Hume.

Comment


(won't be published)