diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-02 15:30:38 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2012-08-02 15:30:38 -0300 |
commit | 96e92b616264c26a5c1c2a50f0495c119a869772 (patch) | |
tree | 189539b0598ad36e4e0443311d719ee0db0e013c /railties/lib/rails/generators/erb/scaffold/templates/index.html.erb | |
parent | 99f622de230e582c372e20f4b72792c0fce0fd4a (diff) | |
download | rails-96e92b616264c26a5c1c2a50f0495c119a869772.tar.gz rails-96e92b616264c26a5c1c2a50f0495c119a869772.tar.bz2 rails-96e92b616264c26a5c1c2a50f0495c119a869772.zip |
Use `:data => { :confirm => "Text" }` syntax instead of `:confirm` at
the ERB scaffold generator.
We are trying to teach the data attributes as best practices and
`:confirm` will be deprecated in 4.0.
Diffstat (limited to 'railties/lib/rails/generators/erb/scaffold/templates/index.html.erb')
-rw-r--r-- | railties/lib/rails/generators/erb/scaffold/templates/index.html.erb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb index 7b1a2a1841..a7c12b9026 100644 --- a/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb +++ b/railties/lib/rails/generators/erb/scaffold/templates/index.html.erb @@ -17,7 +17,7 @@ <% end -%> <td><%%= link_to 'Show', <%= singular_table_name %> %></td> <td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td> - <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :confirm, "'Are you sure?'" %>, <%= key_value :method, ":delete" %> %></td> + <td><%%= link_to 'Destroy', <%= singular_table_name %>, <%= key_value :method, ":delete" %>, <%= key_value :data, "{ #{key_value :confirm, "'Are you sure?'"} }" %> %></td> </tr> <%% end %> </table> |