Dynamic Scaffolding and Edge

Jeffrey Hardy,
Sep 5, 2007

We talk about dynamic scaffolding in Rails starting on page 54, Up and Running with Scaffolding, but we need to mention something: the dynamic scaffolding we’re using has been moved out of Rails core and into a plugin.

Now, don’t panic. This won’t affect you if you’re using the latest stable version of Rails (1.2.3 at the time of this writing), but if you’re using edge Rails, it will.

Fortunately, installing the scaffolding plugin couldn’t be any easier:

./script/plugin install scaffolding

The plugin script tries to look for plugins in certain locations, including the Rails svn URL (try ./script/plugin sources to see the complete list of sources). If for some reason it fails to find scaffolding by name, you can always use the full path:

http://svn.rubyonrails.org/rails/plugins/scaffolding

If you’re following along with the book using edge Rails, you’ll need to install this for the examples to work!

(I’m actually a fan of the dynamic scaffolding. I find it useful to be able to tweak my schema and model and play with it before generating boilerplate templates. Actually, I tend to use dynamic scaffolding more that the generated variety. Just my personal preference, though.)