Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

My beautiful eyes [DHH]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3993 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit faecde0ec8c82637ce691fffd7e45e0c623865ba 1 parent 6f8c99f
@dhh dhh authored
View
4 actionpack/lib/action_controller/scaffolding.rb
@@ -99,8 +99,8 @@ def index
module_eval <<-"end_eval", __FILE__, __LINE__
- verify :method=>:post, :only=>[:destroy#{suffix}, :create#{suffix}, :update#{suffix}],
- :redirect_to=>{:action=>:list#{suffix}}
+ verify :method => :post, :only => [ :destroy#{suffix}, :create#{suffix}, :update#{suffix} ],
+ :redirect_to => { :action => :list#{suffix} }
def list#{suffix}
View
2  actionpack/lib/action_controller/templates/scaffolds/list.rhtml
@@ -14,7 +14,7 @@
<% end %>
<td><%= link_to "Show", :action => "show#{@scaffold_suffix}", :id => entry %></td>
<td><%= link_to "Edit", :action => "edit#{@scaffold_suffix}", :id => entry %></td>
- <td><%= link_to "Destroy", {:action => "destroy#{@scaffold_suffix}", :id => entry}, {:confirm => "Are you sure?", :post=>true} %></td>
+ <td><%= link_to "Destroy", {:action => "destroy#{@scaffold_suffix}", :id => entry}, { :confirm => "Are you sure?", :post => true} %></td>
</tr>
<% end %>
</table>
View
2  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>
View
10 railties/lib/rails_generator/generators/components/scaffold/templates/controller.rb
@@ -11,13 +11,9 @@ def <%= action %><%= suffix %>
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
View
2  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>
Please sign in to comment.
Something went wrong with that request. Please try again.