aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2012-08-02 15:30:38 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2012-08-02 15:39:18 -0300
commit9c1b1bd42ce00d43b7894daaf096eff9ee55aef1 (patch)
tree26c31a8dad48182708d86c01d23bc0c3d2fbbb4a /railties/lib/rails/generators
parent55e05d465df668cd057d320664a7168990b6d6fb (diff)
downloadrails-9c1b1bd42ce00d43b7894daaf096eff9ee55aef1.tar.gz
rails-9c1b1bd42ce00d43b7894daaf096eff9ee55aef1.tar.bz2
rails-9c1b1bd42ce00d43b7894daaf096eff9ee55aef1.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')
-rw-r--r--railties/lib/rails/generators/erb/scaffold/templates/index.html.erb2
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>