diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-16 19:43:27 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2004-12-16 19:43:27 +0000 |
commit | 2f3db152ecbb76c9bcb5b2e3aa12816896df79f1 (patch) | |
tree | dd2e7378ea09f1ba2ce124a3c7b24ca8c47ac01f /railties/generators/scaffold/templates | |
parent | b64c26ad9db0c85fc21c34dde28ba747552f05c9 (diff) | |
download | rails-2f3db152ecbb76c9bcb5b2e3aa12816896df79f1.tar.gz rails-2f3db152ecbb76c9bcb5b2e3aa12816896df79f1.tar.bz2 rails-2f3db152ecbb76c9bcb5b2e3aa12816896df79f1.zip |
Made the last tweaks before 0.9
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/generators/scaffold/templates')
-rw-r--r-- | railties/generators/scaffold/templates/controller.rb | 3 | ||||
-rw-r--r-- | railties/generators/scaffold/templates/functional_test.rb | 2 | ||||
-rw-r--r-- | railties/generators/scaffold/templates/style.css | 36 |
3 files changed, 38 insertions, 3 deletions
diff --git a/railties/generators/scaffold/templates/controller.rb b/railties/generators/scaffold/templates/controller.rb index 83520f4794..15ade4c49b 100644 --- a/railties/generators/scaffold/templates/controller.rb +++ b/railties/generators/scaffold/templates/controller.rb @@ -1,6 +1,5 @@ class <%= class_name %>Controller < ApplicationController - model :<%= singular_name %> - layout 'scaffold' + layout 'scaffold' <% unless suffix -%> def index diff --git a/railties/generators/scaffold/templates/functional_test.rb b/railties/generators/scaffold/templates/functional_test.rb index b7315cfb84..1bf7d83694 100644 --- a/railties/generators/scaffold/templates/functional_test.rb +++ b/railties/generators/scaffold/templates/functional_test.rb @@ -62,7 +62,7 @@ class <%= class_name %>ControllerTest < Test::Unit::TestCase end def test_update<%= suffix %> - process :update<%= suffix %>, 'id' => 1 + process :update<%= suffix %>, '<%= singular_name %>' => { 'id' => 1 } assert_redirected_to :action => 'show<%= suffix %>', :id => 1 end diff --git a/railties/generators/scaffold/templates/style.css b/railties/generators/scaffold/templates/style.css index 2db43b7fa1..8f512501bf 100644 --- a/railties/generators/scaffold/templates/style.css +++ b/railties/generators/scaffold/templates/style.css @@ -15,3 +15,39 @@ pre { a { color: #000; } a:visited { color: #666; } a:hover { color: #fff; background-color:#000; } + +.fieldWithErrors { + padding: 2px; + background-color: red; + display: table; +} + +#ErrorExplanation { + width: 400px; + border: 2px solid #red; + padding: 7px; + padding-bottom: 12px; + margin-bottom: 20px; + background-color: #f0f0f0; +} + +#ErrorExplanation h2 { + text-align: left; + font-weight: bold; + padding: 5px 5px 5px 15px; + font-size: 12px; + margin: -7px; + background-color: #c00; + color: #fff; +} + +#ErrorExplanation p { + color: #333; + margin-bottom: 0; + padding: 5px; +} + +#ErrorExplanation ul li { + font-size: 12px; + list-style: square; +} |