I'm in agreement here. Renaming to prefix with example_ would solve two issues. First, it would explicitly show it to be an example and having to type that would reinforce that. Second, by also adding a statement to the very top of each generated file via some header addition would also help reinforce that. A statement that this is just to give them an idea should suffice.
On Mar 21, 12:12 am, Jeff Cohen <[email protected]> wrote: > I wasn't sure where to jump into this thread, but my vote is to keep the > generator since it is a helpful "canonical example" for those trying to get > started. > > However, I do suggest one change, that might sound a bit radical, but which > I think supports most of the thinking I'm seeing in this thread: rename the > generator to something that makes it clear it's more for educational > purposes than anything else. > > Something like "example_resource" might make it really, really obvious that > the code is an example, shows all the possible actions, even has a couple > of responders, etc... basically a way to see a good example of both code > and forms that follow all of the naming conventions. But it's clear it's > just an *example* and not simply a real starting point. > > $ rails g example_resource Product title sku > > Of course, it *is* a real starting point for those of us who understand > Rails and use it like Jose does - we know how to customize what we want - > but for those new to Rails it's clear it's just an example to help them > understand the possibilities and get familiar with the conventions. > > I think also getting the name "resource" in there helps normalize our > vocabulary a bit more instead of "scaffold" which isn't really used > anywhere else in the framework. > > Jeff -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
