diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-19 08:47:31 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-19 08:47:31 +0000 |
commit | a292cd32226234a63fea0f1de48c5f38d4307fd1 (patch) | |
tree | 422252cb498d6c0380835fc071b7e1a527743cc5 /railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml | |
parent | 0da2357527f54662dbf05883253cacda10a5a36d (diff) | |
download | rails-a292cd32226234a63fea0f1de48c5f38d4307fd1.tar.gz rails-a292cd32226234a63fea0f1de48c5f38d4307fd1.tar.bz2 rails-a292cd32226234a63fea0f1de48c5f38d4307fd1.zip |
Implemented ./script/generate scaffold_resource comment body:text created_at:datetime active:boolean price:decimal
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5147 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml')
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml b/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml index 7781ad8ead..49b7953b78 100644 --- a/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml +++ b/railties/lib/rails_generator/generators/components/scaffold_resource/templates/view_edit.rhtml @@ -1,6 +1,17 @@ <h1>Editing <%= singular_name %></h1> -<%%= form(@<%= singular_name %>) %> +<%% form_for(:<%= singular_name %>, :url => <%= singular_name %>_path(@<%= singular_name %>), :html => { :method => :put }) do |f| %> +<% for attribute in attributes -%> + <p> + <b><%= attribute.column.human_name %></b><br /> + <%%= f.<%= attribute.field_type %> :<%= attribute.name %> %> + </p> + +<% end -%> + <p> + <%%= submit_tag "Update" %> + </p> +<%% end %> <%%= link_to 'Show', <%= singular_name %>_path(@<%= singular_name %>) %> | <%%= link_to 'Back', <%= plural_name %>_path %>
\ No newline at end of file |