Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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.
  • Loading branch information...
commit 9c1b1bd42ce00d43b7894daaf096eff9ee55aef1 1 parent 55e05d4
@rafaelfranca rafaelfranca authored spastorino committed
View
11 railties/CHANGELOG.md
@@ -1,16 +1,21 @@
## Rails 3.2.8 ##
-* No changes.
+* ERB scaffold generator use the `:data => { :confirm => "Text" }` syntax instead of `:confirm`.
+
+ *Rafael Mendonça França*
+
## Rails 3.2.7 (Jul 26, 2012) ##
-* Since Rails 3.2, use layout false to render no layout
-* Use strict_args_position! if available from Thor
+* Since Rails 3.2, use layout false to render no layout
+* Use strict_args_position! if available from Thor
+
## Rails 3.2.6 (Jun 12, 2012) ##
* No changes.
+
## Rails 3.2.4 (May 31, 2012) ##
* Add hook for resource route's generator. *Santiago Pastorino*
View
2  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>
Please sign in to comment.
Something went wrong with that request. Please try again.