Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Ticket #6499: fix_deprecated_link_tag_with_post_in_scaffold.diff

File fix_deprecated_link_tag_with_post_in_scaffold.diff, 1.7 kB (added by packagethief, 2 years ago)
  • actionpack/lib/action_controller/templates/scaffolds/list.rhtml

    old new  
    1414  <% end %> 
    1515    <td><%= link_to "Show", :action => "show#{@scaffold_suffix}", :id => entry %></td> 
    1616    <td><%= link_to "Edit", :action => "edit#{@scaffold_suffix}", :id => entry %></td> 
    17     <td><%= link_to "Destroy", {:action => "destroy#{@scaffold_suffix}", :id => entry}, { :confirm => "Are you sure?", :post => true} %></td> 
     17    <td><%= link_to "Destroy", {:action => "destroy#{@scaffold_suffix}", :id => entry}, { :confirm => "Are you sure?", :method => :post } %></td> 
    1818  </tr> 
    1919<% end %> 
    2020</table> 
  • railties/lib/rails_generator/generators/components/scaffold/templates/view_list.rhtml

    old new  
    1414  <%% end %> 
    1515    <td><%%= link_to 'Show', :action => 'show<%= suffix %>', :id => <%= singular_name %> %></td> 
    1616    <td><%%= link_to 'Edit', :action => 'edit<%= suffix %>', :id => <%= singular_name %> %></td> 
    17     <td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?', :post => true %></td> 
     17    <td><%%= link_to 'Destroy', { :action => 'destroy<%= suffix %>', :id => <%= singular_name %> }, :confirm => 'Are you sure?', :method => :post %></td> 
    1818  </tr> 
    1919<%% end %> 
    2020</table>