This project is archived and is in readonly mode.
Paragraphed anchors and notice layout in generators
-
Clemens Kofler
- Tag changed from 2.1, generators, patch to 2.1, generators, patch, railties
All tests pass. Although I think the scaffold shouldn't be used anyways (or, rather, that you usually throw away the views), it kinda makes sense.
- 1/2 ;-)
-
Pratik
- State changed from new to wontfix
I don't really see much value in this patch. Scaffolding is really meant as a learning tool. Apart from that, as you've moved some stuff to styles.css, it'll make things ugly when people upgrades Rails and when they already have styles.css in their public directory.
-
Andrew Chalkley
Hi Pratik,
The idea of making the changes was to help the rails developer starting off on the right foot. Unobtrusive CSS, well formatted HTML etc, etc.
Having the notice auto generate a paragraph if present is a good for learning, surly?
styles.css doesn't get "generated" in their public directory but scaffold.css doesn't it?
When people upgrade Rails adding a bit of CSS wouldn't be that big of an issue since environments/initialisers have been known to change between updates. I'd imagine mature rails projects will have it's own CSS for notices anyway. But since I would imaging scaffolding would be used primarily at the beginning of a project anyway this wouldn't be a big problem.
Or am I missing something :S ?
-
dan (at danwebb)
I want to support this one. Yes, it is a learning tool and not to be used in production but that why it's a even more important to make sure its not full of nasty markup and inline CSS. Rails is promoting best practices right? I don't think the style.css/upgrade issue is anywhere near enough of a problem to can this and the markup stuff is very worth putting in.
-
Glenn Gillen
For what it's worth, I'd give this a +1.
"I don't really see much value in this patch."
I don't see much justification for knowingly generating bad markup.
-
Pratik
- State changed from wontfix to new
I'm pretty sure there was a long discussion in the ML about rejecting this change. But as I cannot find it, I'm reopening the ticket.
Thanks.
-
Pratik
Also, I think the following :
<% if flash[:notice].present? %> <p style="color: green"><%%= flash[:notice] %></p> <% end %>is better than :
<%%= content_tag(:p, flash[:notice],:id => "notice") unless flash[:notice].blank? %> -
José Valim
- Assigned user set to José Valim
- Milestone cleared.
-
Andrew Chalkley
- Tag changed from 2.1, generators, patch, railties to 3.0, generators, patch, railties
Well, it'd be nice to have the notice in the id attribute and not have inline styling...
<% if flash[:notice].present? %>
<% end %><%%= flash[:notice] %> -
Repository
(from [5096ba961c49e5b419c3400acd7c87373a36d6d4]) Remove inline css. [#593 Paragraphed anchors and notice layout in generators status:resolved] http://github.com/rails/rails/commit/5096ba961c49e5b419c3400acd7c87...
-
José Valim
- State changed from new to resolved
