diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-05-16 01:24:25 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-05-16 01:24:25 +0000 |
commit | 056fdc74d52833ac2755713e990bd9f3f9a8c415 (patch) | |
tree | 560891bc7b8c4d2b113de8e4080238a162aa67ab | |
parent | 4f2a950ce2f29d4c6ce777d5a949440b6c2a440f (diff) | |
download | rails-056fdc74d52833ac2755713e990bd9f3f9a8c415.tar.gz rails-056fdc74d52833ac2755713e990bd9f3f9a8c415.tar.bz2 rails-056fdc74d52833ac2755713e990bd9f3f9a8c415.zip |
Scaffold resource is now scaffold
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6746 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/USAGE (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/USAGE) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_resource_generator.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/fixtures.yml (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/layout.html.erb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/model.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/style.css (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/style.css) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/unit_test.rb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb) | 0 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.html.erb) | 6 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.html.erb) | 4 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.html.erb) | 4 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb (renamed from railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.html.erb) | 0 |
15 files changed, 7 insertions, 7 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/USAGE b/railties/lib/rails_generator/generators/components/scaffold/USAGE index 60e13c770f..60e13c770f 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/USAGE +++ b/railties/lib/rails_generator/generators/components/scaffold/USAGE diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb b/railties/lib/rails_generator/generators/components/scaffold/scaffold_resource_generator.rb index a10f7f12b3..a10f7f12b3 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/scaffold_resource_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_resource_generator.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb index f28f364af0..f28f364af0 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/controller.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml b/railties/lib/rails_generator/generators/components/scaffold/templates/fixtures.yml index 9f5ae29a81..9f5ae29a81 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/fixtures.yml +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/fixtures.yml diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb index 0c68fd3122..0c68fd3122 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/functional_test.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/functional_test.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb index 9bd821b1b2..9bd821b1b2 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/helper.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/helper.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/layout.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb index 5c1f304232..5c1f304232 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/layout.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/layout.html.erb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb index cb1ddd399e..cb1ddd399e 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/migration.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/migration.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/model.rb index 8d4c89e912..8d4c89e912 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/model.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/model.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/style.css b/railties/lib/rails_generator/generators/components/scaffold/templates/style.css index 8f239a3597..8f239a3597 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/style.css +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/style.css diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/unit_test.rb index b464de47a2..b464de47a2 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/unit_test.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/unit_test.rb diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb index bf165e02be..a39916db96 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.html.erb @@ -2,7 +2,7 @@ <%%= error_messages_for :<%= singular_name %> %> -<%% form_for(:<%= singular_name %>, :url => <%= singular_name %>_path(@<%= singular_name %>), :html => { :method => :put }) do |f| %> +<%% form_for(@<%= singular_name %>) do |f| %> <% for attribute in attributes -%> <p> <b><%= attribute.column.human_name %></b><br /> @@ -11,9 +11,9 @@ <% end -%> <p> - <%%= submit_tag "Update" %> + <%%= f.submit "Update" %> </p> <%% end %> -<%%= link_to 'Show', <%= singular_name %>_path(@<%= singular_name %>) %> | +<%%= link_to 'Show', @<%= singular_name %> %> | <%%= link_to 'Back', <%= plural_name %>_path %>
\ No newline at end of file diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb index 9ad899465c..88a4c9bf77 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_index.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_index.html.erb @@ -12,9 +12,9 @@ <% for attribute in attributes -%> <td><%%=h <%= singular_name %>.<%= attribute.name %> %></td> <% end -%> - <td><%%= link_to 'Show', <%= singular_name %>_path(<%= singular_name %>) %></td> + <td><%%= link_to 'Show', <%= singular_name %> %></td> <td><%%= link_to 'Edit', edit_<%= singular_name %>_path(<%= singular_name %>) %></td> - <td><%%= link_to 'Destroy', <%= singular_name %>_path(<%= singular_name %>), :confirm => 'Are you sure?', :method => :delete %></td> + <td><%%= link_to 'Destroy', <%= singular_name %>), :confirm => 'Are you sure?', :method => :delete %></td> </tr> <%% end %> </table> diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb index b3b6f91453..3d92e1f516 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_new.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.html.erb @@ -2,7 +2,7 @@ <%%= error_messages_for :<%= singular_name %> %> -<%% form_for(:<%= singular_name %>, :url => <%= plural_name %>_path) do |f| %> +<%% form_for(@<%= singular_name %>) do |f| %> <% for attribute in attributes -%> <p> <b><%= attribute.column.human_name %></b><br /> @@ -11,7 +11,7 @@ <% end -%> <p> - <%%= submit_tag "Create" %> + <%%= f.submit "Create" %> </p> <%% end %> diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.html.erb b/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb index adecaf70c6..adecaf70c6 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_show.html.erb +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.html.erb |