Skip to content

Commit

Permalink
Update javascript topics to 1.9-style hashes (#313).
Browse files Browse the repository at this point in the history
  • Loading branch information
kytrinyx committed Nov 17, 2012
1 parent fcda54c commit 9ab2524
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/topics/javascript/rails_and_javascript.markdown
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 9ab2524

Please sign in to comment.