diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-21 12:08:17 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-03-21 12:08:17 +0000 |
commit | 7d09215506503354f5bdea48544e5f07a4376efa (patch) | |
tree | 2a16bb2c15b44af5dc5e92d4d4c752a91d3560d0 /railties/lib/rails_generator/generators/components/scaffold | |
parent | d06239e177efa8a851d1c7f6ef25a03fc257e2b9 (diff) | |
download | rails-7d09215506503354f5bdea48544e5f07a4376efa.tar.gz rails-7d09215506503354f5bdea48544e5f07a4376efa.tar.bz2 rails-7d09215506503354f5bdea48544e5f07a4376efa.zip |
Dont repeat error messages in scaffolds
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators/components/scaffold')
3 files changed, 3 insertions, 9 deletions
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml b/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml index d932095f93..4caf1d06a0 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_edit.rhtml @@ -1,11 +1,8 @@ <h1>Editing <%= singular_name %></h1> -<%%= error_messages_for '<%= singular_name %>' %> - <%%= start_form_tag :action => 'update<%= @suffix %>', :id => @<%= singular_name %> %> <%%= render_partial "form" %> - - <input type="submit" value="Edit" /> + <%%= submit_tag "Edit" %> <%%= end_form_tag %> <%%= link_to 'Show', :action => 'show<%= suffix %>', :id => @<%= singular_name %> %> | diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml b/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml index 19cfa12ba2..3521b00536 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_new.rhtml @@ -1,11 +1,8 @@ <h1>New <%= singular_name %></h1> -<%%= error_messages_for '<%= singular_name %>' %> - <%%= start_form_tag :action => 'create<%= @suffix %>' %> <%%= render_partial "form" %> - - <input type="submit" value="Create" /> + <%%= submit_tag "Create" %> <%%= end_form_tag %> <%%= link_to 'Back', :action => 'list<%= suffix %>' %> diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml b/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml index 69fb55b5e4..c9245cdfda 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml +++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_show.rhtml @@ -1,6 +1,6 @@ <%% for column in <%= model_name %>.content_columns %> <p> - <b><%%= column.human_name %>:</b> <%%= @<%= singular_name %>.send(column.name) %> + <b><%%= column.human_name %>:</b> <%%=h @<%= singular_name %>.send(column.name) %> </p> <%% end %> |