aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-03-20 05:39:13 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-03-20 05:39:13 +0000
commitfaecde0ec8c82637ce691fffd7e45e0c623865ba (patch)
tree1581d18faa283cddf5028e5c060a2f9f74284367 /railties
parent6f8c99fa34692f44c4470e0ef155ecc1c8b32cd2 (diff)
downloadrails-faecde0ec8c82637ce691fffd7e45e0c623865ba.tar.gz
rails-faecde0ec8c82637ce691fffd7e45e0c623865ba.tar.bz2
rails-faecde0ec8c82637ce691fffd7e45e0c623865ba.zip
My beautiful eyes [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties')
-rw-r--r--railties/html/500.html2
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb10
-rw-r--r--railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml2
3 files changed, 5 insertions, 9 deletions
diff --git a/railties/html/500.html b/railties/html/500.html
index a1001a008d..ab95f74c46 100644
--- a/railties/html/500.html
+++ b/railties/html/500.html
@@ -2,7 +2,7 @@
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<body>
- <h1>Application error (Apache)</h1>
+ <h1>Application error</h1>
<p>Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html</p>
</body>
</html> \ No newline at end of file
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
index 9595fcca61..c059e74536 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
+++ b/railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
@@ -11,13 +11,9 @@ class <%= controller_class_name %>Controller < ApplicationController
end
<% end -%>
-
- # GET should only be used for operations which are 'safe', or read-only. So require
- # post for all actions which change state.
- #
- # http://www.w3.org/2001/tag/doc/whenToUseGet.html
- verify :method=>:post, :only=>[:destroy<%= suffix %>, :create<%= suffix %>, :update<%= suffix %>],
- :redirect_to=> {:action=>:list<%= suffix %>}
+ # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html)
+ verify :method => :post, :only => [ :destroy<%= suffix %>, :create<%= suffix %>, :update<%= suffix %> ],
+ :redirect_to => { :action => :list<%= suffix %> }
def list<%= suffix %>
@<%= singular_name %>_pages, @<%= plural_name %> = paginate :<%= plural_name %>, :per_page => 10
diff --git a/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml b/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml
index 2c6314f4bb..ea1ca7ea53 100644
--- a/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml
+++ b/railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml
@@ -14,7 +14,7 @@
<%% end %>
<td><%%= link_to 'Show', :action => 'show<%= suffix %>', :id => <%= singular_name %> %></td>
<td><%%= link_to 'Edit', :action => 'edit<%= suffix %>', :id => <%= singular_name %> %></td>
- <td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?', :post=>true %></td>
+ <td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?', :post => true %></td>
</tr>
<%% end %>
</table>