diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-08-31 11:07:37 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-08-31 11:07:37 -0700 |
commit | 7e3abbfdc2087e397816f2b81b739558c064c576 (patch) | |
tree | f788a894310bc941d9d33c0c46bf98af98ff3aa8 | |
parent | 7316d029e60f5d531b35af9e66d233ea19e4f240 (diff) | |
parent | d8d83e7821224a762bb215f65002c4afe737a5a3 (diff) | |
download | rails-7e3abbfdc2087e397816f2b81b739558c064c576.tar.gz rails-7e3abbfdc2087e397816f2b81b739558c064c576.tar.bz2 rails-7e3abbfdc2087e397816f2b81b739558c064c576.zip |
Merge commit 'jose/generators'
3 files changed, 4 insertions, 3 deletions
diff --git a/railties/lib/generators/erb/scaffold/templates/_form.html.erb b/railties/lib/generators/erb/scaffold/templates/_form.html.erb index 473ebe14fb..d02028d983 100644 --- a/railties/lib/generators/erb/scaffold/templates/_form.html.erb +++ b/railties/lib/generators/erb/scaffold/templates/_form.html.erb @@ -2,12 +2,12 @@ <%%= f.error_messages %> <% for attribute in attributes -%> - <div class="attribute"> + <div class="field"> <%%= f.label :<%= attribute.name %> %><br /> <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> </div> <% end -%> - <div class="action"> + <div class="actions"> <%% if @<%= singular_name %>.new_record? %> <%%= f.submit 'Create' %> <%% else %> diff --git a/railties/lib/generators/rails/stylesheets/templates/scaffold.css b/railties/lib/generators/rails/stylesheets/templates/scaffold.css index a3fdd11f6d..d9fa2cf2dc 100644 --- a/railties/lib/generators/rails/stylesheets/templates/scaffold.css +++ b/railties/lib/generators/rails/stylesheets/templates/scaffold.css @@ -16,7 +16,7 @@ a { color: #000; } a:visited { color: #666; } a:hover { color: #fff; background-color:#000; } -div.attribute, div.action { +div.field, div.actions { margin-bottom: 10px; } diff --git a/railties/test/generators/scaffold_generator_test.rb b/railties/test/generators/scaffold_generator_test.rb index 05eadd3460..63559a8a01 100644 --- a/railties/test/generators/scaffold_generator_test.rb +++ b/railties/test/generators/scaffold_generator_test.rb @@ -75,6 +75,7 @@ class ScaffoldGeneratorTest < GeneratorsTestCase edit new show + _form ).each { |view| assert_file "app/views/product_lines/#{view}.html.erb" } assert_file "app/views/layouts/product_lines.html.erb" |