Rails scaffold on 3.0

Oh, you might wanna take a look at this then:

http://github.com/rails/rails/commit/01d92021e69f54def1ec8103b2b99f907dd88ec4

Good point.

I'm doing HTML5 stuff on my own, and I guess I haven't seen any discussions here regarding switching to HTML5 in the scaffolding so I assumed we were waiting until the spec is finished. (Not that the markup Josh added to scaffolding will change at all, that stuff is hammered down).

1) Yes. 2) Yes. 3) Yes. 4) Not sure. Just don't name it "footer". I'd really prefer that they were buttons sitting next to the Create/Update submit buttons. Speaking of which, the P surrounding those should probably be a DIV, and should at least have a class added. It would also be nice to have an HR between the form and the submit buttons. 5) Yes. Although I'd prefer it more the way #18 Looping Through Flash - RailsCasts (and comments) do it:

<%- if flash -%>   <div class="flash">     <%- [:error, :warning, :notice, :message].each do |key| -%>       <%= content_tag :div, flash[key], :class => key if flash[key] %>     <%- end -%>   </div> <%- end -%>

Rails 3.0 generators will be customizable per application.

Yay! It's a pain to override them in 2.3.

Craig Buchek BoochTek, LLC

It is out of the discussion I think but please, please, make the scaffold generator understand simple nested resources so the controller has a 'load_parent' before_filter and the views use the correct nested named routes. That would make it way easier for beginners to understand how restful resources work.

Just pushed some changes.

1) Should we put forms in a _form partial? On the same way this is the "best practice", we are adding more code for people to grasp at the beginning.

DONE.

2) Change forms to use <ol> and <li> instead of paragraphs;

Forms now use div with class "attribute" for inputs and "action" for buttons.

3) Change show view to use definition list (<dl>), instead of paragraphs and bold (HTML dl tag);

Kept paragraph with bold.

4) Wrap footer links (Show and Back) in paragraphs.

Remained the same.

5) Remove inline CSS from:

<p style="color: green"><%= flash[:notice %></p>

And wrap it around a html class.

Changed to: <p class="notice"><%= flash[:notice] %></p>

That's all.

The commits are:

http://github.com/rails/rails/commit/5d645c271b350c2a3ed7fd835e539322cda61d8c http://github.com/rails/rails/commit/5096ba961c49e5b419c3400acd7c87373a36d6d4