diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2010-04-13 12:33:34 -0700 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2010-04-13 12:33:34 -0700 |
commit | 8116a2b981b7382c467f84597e92156385f037d7 (patch) | |
tree | 4fc9f1981b625a2aaa7b63d62e5dc4aac82b69f4 /railties/lib/rails | |
parent | 5c897270c20a8f680156cf66c5982c1251898811 (diff) | |
download | rails-8116a2b981b7382c467f84597e92156385f037d7.tar.gz rails-8116a2b981b7382c467f84597e92156385f037d7.tar.bz2 rails-8116a2b981b7382c467f84597e92156385f037d7.zip |
Cleanup indention and spacing and turn errorExplanation into error_explanation now that nobody depends on it anymore
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb | 17 | ||||
-rw-r--r-- | railties/lib/rails/generators/rails/stylesheets/templates/scaffold.css | 6 |
2 files changed, 12 insertions, 11 deletions
diff --git a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb index 0615a34a85..9b83207b3f 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb @@ -1,13 +1,14 @@ <%%= form_for(@<%= singular_name %>) do |f| %> <%% if @<%= singular_name %>.errors.any? %> - <div id="errorExplanation"> - <h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2> - <ul> - <%% @<%= singular_name %>.errors.full_messages.each do |msg| %> - <li><%%= msg %></li> - <%% end %> - </ul> - </div> + <div id="error_explanation"> + <h2><%%= pluralize(@<%= singular_name %>.errors.count, "error") %> prohibited this <%= singular_name %> from being saved:</h2> + + <ul> + <%% @<%= singular_name %>.errors.full_messages.each do |msg| %> + <li><%%= msg %></li> + <%% end %> + </ul> + </div> <%% end %> <% for attribute in attributes -%> diff --git a/railties/lib/rails/generators/rails/stylesheets/templates/scaffold.css b/railties/lib/rails/generators/rails/stylesheets/templates/scaffold.css index f3f46d8b98..9f2056a702 100644 --- a/railties/lib/rails/generators/rails/stylesheets/templates/scaffold.css +++ b/railties/lib/rails/generators/rails/stylesheets/templates/scaffold.css @@ -34,7 +34,7 @@ div.field, div.actions { display: table; } -#errorExplanation { +#error_explanation { width: 450px; border: 2px solid red; padding: 7px; @@ -43,7 +43,7 @@ div.field, div.actions { background-color: #f0f0f0; } -#errorExplanation h2 { +#error_explanation h2 { text-align: left; font-weight: bold; padding: 5px 5px 5px 15px; @@ -54,7 +54,7 @@ div.field, div.actions { color: #fff; } -#errorExplanation ul li { +#error_explanation ul li { font-size: 12px; list-style: square; } |