"Best practice" for doing CRUD?

Since you are on edge rails you can use the new scaffold_resources.

script/generate scaffold_resources things title:string foo:text created_at:datetime updated_at:datetime

-Ezra

  Since you are on edge rails you can use the new scaffold_resources.

script/generate scaffold_resources things title:string foo:text
created_at:datetime updated_at:datetime

Ezra, are you sure it's committed yet?

  C:\dev>ruby script\generate scaffold_resources
  Couldn't find 'scaffold_resources' generator

I have edge revision 5170 (performed a rails:freeze + rails:update just
a few minutes before my original post).

Thanks!
Jeff

Hey Jeff-

  Yeah its in there for at least a week or so. I just used it. It actually is scaffold_resource singular while in its usage text it says scaffold_resources :wink:

ez ey $ script/generate scaffold_resource
Usage: script/generate scaffold_resources ModelName

Rails Info:
     -v, --version Show the Rails version number and quit.
     -h, --help Show this help message and quit.

General Options:
     -p, --pretend Run but do not make any changes.
     -f, --force Overwrite files that already exist.
     -s, --skip Skip files that already exist.
     -q, --quiet Suppress normal output.
     -t, --backtrace Debugging: show backtrace on errors.
     -c, --svn Modify files with subversion. (Note: svn must be in path)

Description:
     Explain the generator

Example:
     ./script/generate resource_generator Thing

     This will create:
         what/will/it/create

-Ezra

Ezra Zygmuntowicz wrote:

  Yeah its in there for at least a week or so. I just used it. It
actually is scaffold_resource singular while in its usage text it
says scaffold_resources :wink:

ez ey $ script/generate scaffold_resource
Usage: script/generate scaffold_resources ModelName

Awesome. Thanks Ezra.

Jeff
softiesonrails.com