aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2015-11-25 20:40:06 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2015-11-25 20:40:06 +0100
commit3fcc0ca99107fa57110421b392f5854555f17fe2 (patch)
treed7f4b627310c8f4afddface7e1274ca8703d16cd /railties/lib
parentc2ad6dae14959a8e891a51389d6f8e43c392443a (diff)
parent530ee4d734caabd770204b79fb706569bd58ada7 (diff)
downloadrails-3fcc0ca99107fa57110421b392f5854555f17fe2.tar.gz
rails-3fcc0ca99107fa57110421b392f5854555f17fe2.tar.bz2
rails-3fcc0ca99107fa57110421b392f5854555f17fe2.zip
Merge pull request #22401 from cllns/remove-br-from-scaffold
Remove <br> from scaffold form, in favor of using CSS
Diffstat (limited to 'railties/lib')
-rw-r--r--railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb6
-rw-r--r--railties/lib/rails/generators/rails/scaffold/templates/scaffold.css4
2 files changed, 7 insertions, 3 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 d99b27cb2d..519b6c8603 100644
--- a/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb
+++ b/railties/lib/rails/generators/erb/scaffold/templates/_form.html.erb
@@ -14,15 +14,15 @@
<% attributes.each do |attribute| -%>
<div class="field">
<% if attribute.password_digest? -%>
- <%%= f.label :password %><br>
+ <%%= f.label :password %>
<%%= f.password_field :password %>
</div>
<div class="field">
- <%%= f.label :password_confirmation %><br>
+ <%%= f.label :password_confirmation %>
<%%= f.password_field :password_confirmation %>
<% else -%>
- <%%= f.label :<%= attribute.column_name %> %><br>
+ <%%= f.label :<%= attribute.column_name %> %>
<%%= f.<%= attribute.field_type %> :<%= attribute.column_name %> %>
<% end -%>
</div>
diff --git a/railties/lib/rails/generators/rails/scaffold/templates/scaffold.css b/railties/lib/rails/generators/rails/scaffold/templates/scaffold.css
index b7818883d1..79f8b7f96f 100644
--- a/railties/lib/rails/generators/rails/scaffold/templates/scaffold.css
+++ b/railties/lib/rails/generators/rails/scaffold/templates/scaffold.css
@@ -78,3 +78,7 @@ div.actions {
font-size: 12px;
list-style: square;
}
+
+label {
+ display: block;
+}