A funny panel on how to get past scaffolding.
How do I do x, y and z with scaffolding? The answer is STOP, and learn rails. Scaffolding is a rusty spoon, not a swiss army knife.
A slow start, but Amy warmed up very quickly and her slides were VERY VERY funny.
Scaffolding is also WAY overbloated. 10+ files without tests.
It is also brain-numbing. She’s disagreeing with Dave Thomases’ idea of MORE scaffolding, she thinks that it leads to bad coding.
What you need is “Cold-turkey” from the scaffolding. She recommends that you start from scratch.
* put to sleep (not implemented for good reason)
@script/generate controller kittens create view edit feed put_to_sleep@
@script/generate model kitten –skip-migration@
@script/generate model jar –skip-migration@
Her panel was VERY basic, but VERY VERY clear and great. Her book is gonna rock.
She likes to make data before anything therefore her create method is first. She overloads the create method by looking for a variable that was posted THEN saving it.
After this step, she goes and edits the view. With the view, she’s using start_form_tag – why not form_for?
@<%= debug(params) %>@ inside the .rhtml to see what’s going on.
She then went on to show how to make a whole association. Very good!
h3. more fun with forms
sub templates use an underscore @_kitten_form.rhtml@
* layouts partials and views