Permalink
Browse files

Update javascript topics to 1.9-style hashes (#313).

  • Loading branch information...
1 parent fcda54c commit 9ab2524b6e596e9c7703aeb133d92529181d38b9 @kytrinyx kytrinyx committed Nov 17, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 source/topics/javascript/rails_and_javascript.markdown
@@ -33,7 +33,7 @@ The JavaScript searches the DOM for any elements with an attribute `data-method`
The most common example is when, in our view template, we've written:
```erb
-<%= link_to "Delete", article_path(@article), :method => :delete %>
+<%= link_to "Delete", article_path(@article), method: :delete %>
```
The generated HTML looks like this:
@@ -62,8 +62,8 @@ Confirmation dialogs are handled similarly. When we write this in our view templ
```erb
<%= link_to "Delete", article_path(@article),
- :method => :delete,
- :confirm => "Delete #{@article.title}?" %>
+ method: :delete,
+ confirm: "Delete #{@article.title}?" %>
```
We get out HTML like this:

0 comments on commit 9ab2524

Please sign in to comment.